From cb3562ae242c62dd047abf1829100e6393f38087 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 11 Oct 2021 08:06:17 +0000 Subject: extindex: rename var: active => active_shards We also have the idea of active inboxes, too, so "active shards" ought to make the purpose of the data structure more obvious. --- lib/PublicInbox/ExtSearchIdx.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index 8da98ba4..64cd8641 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -434,7 +434,7 @@ DELETE FROM over WHERE num > 0 AND num NOT IN (SELECT docid FROM xref3) SELECT MIN(num) FROM over WHERE num > 0 EOM $cur // return; # empty - my ($r, $n, %active); + my ($r, $n, %active_shards); $nr = 0; while (1) { $r = $self->{oidx}->dbh->selectcol_arrayref(<<"", undef, $cur); @@ -445,15 +445,15 @@ SELECT num FROM over WHERE num >= ? ORDER BY num ASC LIMIT 10000 for my $i ($cur..($n - 1)) { my $idx = idx_shard($self, $i); $idx->ipc_do('xdb_remove_quiet', $i); - $active{$idx} = $idx; + $active_shards{$idx} = $idx; } $cur = $n + 1; } if (checkpoint_due($sync)) { - for my $idx (values %active) { + for my $idx (values %active_shards) { $nr += $idx->ipc_do('nr_quiet_rm') } - %active = (); + %active_shards = (); reindex_checkpoint($self, $sync); } } -- cgit v1.2.3-24-ge0c7