about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchIdx.pm
diff options
authorEric W. Biederman <ebiederm@xmission.com>2018-08-01 11:43:42 -0500
committerEric Wong <e@80x24.org>2018-08-03 20:04:29 +0000
commit3f189032fb2d7c8a9dda732e0263e697ce1cb0ac (patch)
tree61a64eb3639a2c527133d2015b47e407d85eb6f2 /lib/PublicInbox/SearchIdx.pm
parent0aa5baa369e8ecced14773ae62dc14ec305ee1b9 (diff)
When performing an incremental index update with index_sync if a message is seen
to be both added and deleted update the num_highwater mark even though the
message is not otherwise indexed.

This ensures index_sync generates the same msgmap no matter which commit
it stops at during incremental syncs.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'lib/PublicInbox/SearchIdx.pm')
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm
index 2532c8df..54f82aa8 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -583,7 +583,8 @@ sub read_log {
                         my $blob = $1;
                         if (delete $D{$blob}) {
                                 if (defined $self->{regen_down}) {
-                                        $self->{regen_down}--;
+                                        my $num = $self->{regen_down}--;
+                                        $self->{mm}->num_highwater($num);