sort lists of trashed messages after journal replay
the messages are trashed in mailbox (and thus UID) order, and in
practice we expect the operations to complete in order. however, if
older messages need to be trashed after a journal replay, and we get
interrupted again, the next replay would produce an unsorted array,
and thus break the binary search.
amends 2bba9b9
.
This commit is contained in:
parent
c1feba585a
commit
7a4a887b3c
|
@ -1127,6 +1127,8 @@ load_state( sync_vars_t *svars )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose( jfp );
|
fclose( jfp );
|
||||||
|
sort_uint_array( svars->trashed_msgs[F].array );
|
||||||
|
sort_uint_array( svars->trashed_msgs[N].array );
|
||||||
} else {
|
} else {
|
||||||
if (errno != ENOENT) {
|
if (errno != ENOENT) {
|
||||||
sys_error( "Error: cannot read journal %s", svars->jname );
|
sys_error( "Error: cannot read journal %s", svars->jname );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user