From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 4F3431F9F6 for ; Wed, 29 May 2019 08:29:02 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 06/10] v2writable: localize unindex-range.$EPOCH to $sync state Date: Wed, 29 May 2019 08:28:56 +0000 Message-Id: <20190529082900.9312-7-e@80x24.org> In-Reply-To: <20190529082900.9312-1-e@80x24.org> References: <20190529082900.9312-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We don't need to stuff that into $self (V2Writable) which can be longer-lived than a ->index_sync invocation. --- lib/PublicInbox/V2Writable.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index eef5576..315404c 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -840,7 +840,7 @@ Rewritten history? (in $git->{git_dir}) reindexing $git->{git_dir} starting at $range - $self->{"unindex-range.$i"} = "$base..$cur"; + $sync->{"unindex-range.$i"} = "$base..$cur"; } $range; } @@ -983,7 +983,7 @@ sub index_sync { -d $git_dir or next; # missing parts are fine fill_alternates($self, $i); my $git = PublicInbox::Git->new($git_dir); - my $unindex = delete $self->{"unindex-range.$i"}; + my $unindex = delete $sync->{"unindex-range.$i"}; $self->unindex($opts, $git, $unindex) if $unindex; defined(my $range = $sync->{ranges}->[$i]) or next; my $fh = $self->{reindex_pipe} = $git->popen(@cmd, $range); -- EW