From 32f6a1f9498f759041b72d6f4d5cb959088a3dec Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 7 Aug 2020 01:14:03 +0000 Subject: [PATCH] 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. --- lib/PublicInbox/V2Writable.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}) { -- 2.44.0