]> Sergey Matveev's repositories - public-inbox.git/commitdiff
v2writable: move git->cleanup to the correct place
authorEric Wong <e@80x24.org>
Mon, 21 Oct 2019 19:19:00 +0000 (19:19 +0000)
committerEric Wong <e@80x24.org>
Tue, 22 Oct 2019 01:25:33 +0000 (01:25 +0000)
We need to stop the git process to avoid leaking FDs
to Xapian if we recurse ->index_sync on reindex.

lib/PublicInbox/V2Writable.pm

index 7ece6b014ff0f24f2f527da3a43565307c8faa4e..33c0038d18ebac631c2b2a9c84f55222d5d3d5ac 100644 (file)
@@ -1280,8 +1280,8 @@ sub index_sync {
                        $self->{current_info} = "multi_mid $oid";
                        reindex_oid_m($self, $sync, $git, $oid);
                }
                        $self->{current_info} = "multi_mid $oid";
                        reindex_oid_m($self, $sync, $git, $oid);
                }
-               $git->cleanup if $git;
        }
        }
+       $git->cleanup if $git;
        $self->done;
 
        if (my $nr = $sync->{nr}) {
        $self->done;
 
        if (my $nr = $sync->{nr}) {