diff options
Diffstat (limited to 'lib/PublicInbox/V2Writable.pm')
-rw-r--r-- | lib/PublicInbox/V2Writable.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 0582dd5e..16556ddc 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -1308,6 +1308,7 @@ sub index_sync { my $latest = git_dir_latest($self, \$epoch_max); return unless defined $latest; $self->idx_init($opt); # acquire lock + $self->{over}->rethread_prepare($opt); my $sync = { D => {}, # "$mid\0$chash" => $oid unindex_range => {}, # EPOCH => oid_old..oid_new @@ -1370,12 +1371,13 @@ sub index_sync { 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}) { my %again = %$opt; $sync = undef; - delete @again{qw(reindex -skip_lock)}; + delete @again{qw(rethread reindex -skip_lock)}; index_sync($self, \%again); } } |