dovecot-2.2: dsync: Don't log index errors if modseq points beyo...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jun 25 16:03:18 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/d6b18c237be5
changeset: 16554:d6b18c237be5
user: Timo Sirainen <tss at iki.fi>
date: Tue Jun 25 16:03:04 2013 +0300
description:
dsync: Don't log index errors if modseq points beyond the current view.
diffstat:
src/doveadm/dsync/dsync-transaction-log-scan.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r be970e7928eb -r d6b18c237be5 src/doveadm/dsync/dsync-transaction-log-scan.c
--- a/src/doveadm/dsync/dsync-transaction-log-scan.c Tue Jun 25 15:48:24 2013 +0300
+++ b/src/doveadm/dsync/dsync-transaction-log-scan.c Tue Jun 25 16:03:04 2013 +0300
@@ -348,8 +348,8 @@
struct mail_index_view *view, bool pvt_scan,
struct mail_transaction_log_view *log_view, uint64_t modseq)
{
- uint32_t log_seq;
- uoff_t log_offset;
+ uint32_t log_seq, end_seq;
+ uoff_t log_offset, end_offset;
bool reset;
int ret;
@@ -358,10 +358,20 @@
&log_seq, &log_offset))
ret = 0;
else {
+ /* scan the view only up to end of the current view.
+ if there are more changes, we don't care about them until
+ the next sync. the modseq may however already point to
+ beyond the current view's end (FIXME: why?) */
+ end_seq = view->log_file_head_seq;
+ end_offset = view->log_file_head_offset;
+ if (log_seq > end_seq ||
+ (log_seq == end_seq && log_offset > end_offset)) {
+ end_seq = log_seq;
+ end_offset = log_offset;
+ }
ret = mail_transaction_log_view_set(log_view,
log_seq, log_offset,
- view->log_file_head_seq,
- view->log_file_head_offset,
+ end_seq, end_offset,
&reset);
}
if (ret == 0) {
More information about the dovecot-cvs
mailing list