Is there any way to disable the header hashing in dsync?
I'm doing a one-time migration to Dovecot using imapc. The FETCHes for Date & Message-ID take a non-trivial amount of time and it's not clear to me if they have a function for a one-time migration.
-- Richard
On 04 Mar 2016, at 07:47, Richard Laager <rlaager@wiktel.com> wrote:
Is there any way to disable the header hashing in dsync?
I'm doing a one-time migration to Dovecot using imapc. The FETCHes for Date & Message-ID take a non-trivial amount of time and it's not clear to me if they have a function for a one-time migration.
That would be nice, yes. Does the attached patch happen to work? Compiles, but untested for now.
On 03/04/2016 08:52 AM, Timo Sirainen wrote:
On 04 Mar 2016, at 07:47, Richard Laager <rlaager@wiktel.com> wrote:
Is there any way to disable the header hashing in dsync? ... Does the attached patch happen to work? Compiles, but untested for now.
It works with one more change on top of your patch: diff --git a/src/doveadm/dsync/dsync-mailbox-export.c b/src/doveadm/dsync/dsync-mailbox-export.c index 361cc55..0267f86 100644 --- a/src/doveadm/dsync/dsync-mailbox-export.c +++ b/src/doveadm/dsync/dsync-mailbox-export.c @@ -518,7 +518,7 @@ dsync_mailbox_export_init(struct mailbox *box, p_array_init(&exporter->expunged_seqs, pool, 16); p_array_init(&exporter->expunged_guids, pool, 16); - if (!exporter->mails_have_guids) + if (!exporter->mails_have_guids && !exporter->no_hdr_hashes) exporter->wanted_headers = dsync_mail_get_hash_headers(box); /* first scan transaction log and save any expunges and flag changes */ -- Richard
We've completed our migration to Dovecot (yay!), so this isn't critical for me any more. But this change might still be a useful addition to Dovecot. It doesn't create any non-standard behavior (like my patch for non-atom flags). On 03/07/2016 11:16 PM, Richard Laager wrote:
On 03/04/2016 08:52 AM, Timo Sirainen wrote:
On 04 Mar 2016, at 07:47, Richard Laager <rlaager@wiktel.com> wrote:
Is there any way to disable the header hashing in dsync? ... Does the attached patch happen to work? Compiles, but untested for now.
It works with one more change on top of your patch:
diff --git a/src/doveadm/dsync/dsync-mailbox-export.c b/src/doveadm/dsync/dsync-mailbox-export.c index 361cc55..0267f86 100644 --- a/src/doveadm/dsync/dsync-mailbox-export.c +++ b/src/doveadm/dsync/dsync-mailbox-export.c @@ -518,7 +518,7 @@ dsync_mailbox_export_init(struct mailbox *box, p_array_init(&exporter->expunged_seqs, pool, 16); p_array_init(&exporter->expunged_guids, pool, 16);
- if (!exporter->mails_have_guids) + if (!exporter->mails_have_guids && !exporter->no_hdr_hashes) exporter->wanted_headers = dsync_mail_get_hash_headers(box);
/* first scan transaction log and save any expunges and flag changes */
-- Richard
I added it today: https://github.com/dovecot/core/commit/03af8e5325a7b4fec36414ac35949457bc426...
On 12 Apr 2016, at 23:46, Richard Laager <rlaager@wiktel.com> wrote:
We've completed our migration to Dovecot (yay!), so this isn't critical for me any more. But this change might still be a useful addition to Dovecot. It doesn't create any non-standard behavior (like my patch for non-atom flags).
On 03/07/2016 11:16 PM, Richard Laager wrote:
On 03/04/2016 08:52 AM, Timo Sirainen wrote:
On 04 Mar 2016, at 07:47, Richard Laager <rlaager@wiktel.com> wrote:
Is there any way to disable the header hashing in dsync? ... Does the attached patch happen to work? Compiles, but untested for now.
It works with one more change on top of your patch:
diff --git a/src/doveadm/dsync/dsync-mailbox-export.c b/src/doveadm/dsync/dsync-mailbox-export.c index 361cc55..0267f86 100644 --- a/src/doveadm/dsync/dsync-mailbox-export.c +++ b/src/doveadm/dsync/dsync-mailbox-export.c @@ -518,7 +518,7 @@ dsync_mailbox_export_init(struct mailbox *box, p_array_init(&exporter->expunged_seqs, pool, 16); p_array_init(&exporter->expunged_guids, pool, 16);
- if (!exporter->mails_have_guids) + if (!exporter->mails_have_guids && !exporter->no_hdr_hashes) exporter->wanted_headers = dsync_mail_get_hash_headers(box);
/* first scan transaction log and save any expunges and flag changes */
-- Richard <dsync.diff>
On 04/12/2016 04:05 PM, Timo Sirainen wrote:
I added it today: https://github.com/dovecot/core/commit/03af8e5325a7b4fec36414ac35949457bc426...
Cool. And thanks for the awesome software!
-- Richard
participants (2)
-
Richard Laager
-
Timo Sirainen