From 5a32c9646edfb610679d9d29d182c263ca819b08 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 24 Jul 2020 05:56:06 +0000 Subject: v2writable: {unindexed} belongs in $sync state There's no reason for {unindexed} to persist beyond an ->index_sync call. --- lib/PublicInbox/V2Writable.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox') diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 9a58a7a9..f159d39c 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -891,12 +891,12 @@ sub reindex_oid ($$$) { } # {unindexed} is unlikely - if ((my $unindexed = $self->{unindexed}) && scalar(@$mids) == 1) { + if ((my $unindexed = $sync->{unindexed}) && scalar(@$mids) == 1) { $num = delete($unindexed->{$mids->[0]}); if (defined $num) { $mid0 = $mids->[0]; $self->{mm}->mid_set($num, $mid0); - delete($self->{unindexed}) if !keys(%$unindexed); + delete($sync->{unindexed}) if !keys(%$unindexed); } } if (!defined($num)) { # reuse if reindexing (or duplicates) @@ -1125,7 +1125,7 @@ sub unindex_oid ($$;$) { # a mirror because the source used -purge or -edit sub unindex ($$$$) { my ($self, $sync, $git, $unindex_range) = @_; - my $unindexed = $self->{unindexed} ||= {}; # $mid0 => $num + my $unindexed = $sync->{unindexed} ||= {}; # $mid0 => $num my $before = scalar keys %$unindexed; # order does not matter, here: my @cmd = qw(log --raw -r -- cgit v1.2.3-24-ge0c7