]> Sergey Matveev's repositories - public-inbox.git/commitdiff
searchidx: favor $sync->{ibx} (over $self->{ibx})
authorEric Wong <e@80x24.org>
Tue, 27 Oct 2020 07:54:39 +0000 (07:54 +0000)
committerEric Wong <e@80x24.org>
Sat, 7 Nov 2020 10:21:57 +0000 (10:21 +0000)
In case we want to reuse code with ExtSearchIdx or V2Writable.

lib/PublicInbox/SearchIdx.pm

index ea884434a4382eaddf3f6bacb6173b8138a78f02..32fa16f5c227ff880f8d0008a973542231f30c20 100644 (file)
@@ -691,7 +691,7 @@ sub v1_checkpoint ($$;$) {
 
        $self->{oidx}->rethread_done($sync->{-opt}) if $newest; # all done
        commit_txn_lazy($self);
-       $self->{ibx}->git->cleanup;
+       $sync->{ibx}->git->cleanup;
        my $nr = ${$sync->{nr}};
        idx_release($self, $nr);
        # let another process do some work...
@@ -707,7 +707,7 @@ sub v1_checkpoint ($$;$) {
 # only for v1
 sub process_stack {
        my ($self, $sync, $stk) = @_;
-       my $git = $self->{ibx}->git;
+       my $git = $sync->{ibx}->git;
        my $max = $self->{batch_bytes};
        my $nr = 0;
        $sync->{nr} = \$nr;