From: Eric Wong Date: Fri, 7 Aug 2020 01:14:03 +0000 (+0000) Subject: v2writable: fix rethread cleanup X-Git-Tag: v1.6.0~170 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=32f6a1f9498f759041b72d6f4d5cb959088a3dec v2writable: fix rethread cleanup We need to drop old ghosts properly while inside the transaction, otherwise it becomes a no-op. This isn't a big deal, as it only results in a few dangling DB rows and a small amount of wasted space. --- diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 344edbba..f98afa61 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -1244,13 +1244,13 @@ sub index_sync { } # work forwards through history index_epoch($self, $sync, $_) for (0..$epoch_max); + $self->{over}->rethread_done($opt); $self->done; if (my $nr = $sync->{nr}) { my $pr = $sync->{-opt}->{-progress}; $pr->('all.git '.sprintf($sync->{-regen_fmt}, $$nr)) if $pr; } - $self->{over}->rethread_done($opt); # reindex does not pick up new changes, so we rerun w/o it: if ($opt->{reindex}) {