diff options
author | Eric Wong <e@80x24.org> | 2021-10-11 08:06:17 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-10-12 03:40:36 +0000 |
commit | cb3562ae242c62dd047abf1829100e6393f38087 (patch) | |
tree | 395b82cdfdb036f537611734c0405ce5c38c9d5a | |
parent | 4c6d7f06985840068340f33eef81dcf7eb8209e0 (diff) | |
download | public-inbox-cb3562ae242c62dd047abf1829100e6393f38087.tar.gz |
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.
-rw-r--r-- | lib/PublicInbox/ExtSearchIdx.pm | 8 |
1 files changed, 4 insertions, 4 deletions
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); } } |