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(-)

diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm
index 8da98ba44a9a..64cd8641585d 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);
                }
        }
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/

Reply via email to