]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
cindex: show shard number in progress message
authorEric Wong <e@80x24.org>
Tue, 21 Mar 2023 23:07:28 +0000 (23:07 +0000)
committerEric Wong <e@80x24.org>
Sat, 25 Mar 2023 09:37:50 +0000 (09:37 +0000)
Otherwise it may be confusing to see the `$nr' value walk
backwards if some shards are indexing at a slower pace.

lib/PublicInbox/CodeSearchIdx.pm

index 97c563bd2cbed9cec4e38344a655689d38e9b75e..ee2d9a47e6a151255b429d268fdeecd6ef3bff6a 100644 (file)
@@ -186,7 +186,7 @@ sub shard_index { # via wq_io_do
                last if $quit; # likely SIGPIPE
                ++$nr;
                if ($max <= 0 && !$PublicInbox::Search::X{CLOEXEC_UNSET}) {
-                       progress($self, $nr);
+                       progress($self, "[$n] $nr");
                        $self->{xdb}->commit_transaction;
                        $max = $batch_bytes;
                        $self->{xdb}->begin_transaction;