[Dovecot] plugin problem
Timo Sirainen
tss at iki.fi
Sun Sep 30 15:39:59 EEST 2007
On Sun, 2007-09-30 at 14:10 +0200, Johannes Berg wrote:
> The copy code has this:
>
> keywords_list = mail_get_keywords(mail);
> keywords = strarray_length(keywords_list) == 0 ? NULL :
> mailbox_keywords_create(t, keywords_list);
> if (mailbox_copy(t, mail, mail_get_flags(mail),
> keywords, NULL) < 0)
> ret = mail->expunged ? 0 : -1;
> mailbox_keywords_free(t, &keywords);
>
> I take it all the keywords handling is part of the mail and hence part
> of the transaction?
Right.
> Also, you have
> src_trans = mailbox_transaction_begin(client->mailbox, 0);
>
> is there no need to roll back that transaction if something fails? You
> don't seem to do so when e.g. mailbox_search_deinit fails but that still
> makes the COPY command return an error.
src_trans is used only for reading the mailbox. The only thing
committing it does it to possibly update dovecot.index.cache file, which
is a good thing to do always.
If mailbox_search_deinit() fails it could still mean that some mails
were read and cache file could be updated for them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070930/ff6b2eb3/attachment-0001.bin
More information about the dovecot
mailing list