From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 2E5441F510 for ; Tue, 21 Mar 2023 23:07:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1679440066; bh=jGVc9ZGcvwJ2cjVKfPOluAfEJEsxrVRZSnwejeOdfek=; h=From:To:Subject:Date:In-Reply-To:References:From; b=W8TvYcXdyUDfWN0qTVLMDiBsBIDBhGO5KQ9GhWNU6fnK7rcijiOAdCAzhimBlkeOr bjB3pbw8L+jki55IY0g0oyUUp9qe1iWN0EMe2qKXSo8O+piF5ZOc8iuMjSR8k2c8W2 XB6A64ny5xtqEjwvxnnfe/s/xa1cI9civppdX08w= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 13/28] cindex: show shard number in progress message Date: Tue, 21 Mar 2023 23:07:28 +0000 Message-Id: <20230321230743.3020032-13-e@80x24.org> In-Reply-To: <20230321230743.3020032-1-e@80x24.org> References: <20230321230701.3019936-1-e@80x24.org> <20230321230743.3020032-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/CodeSearchIdx.pm b/lib/PublicInbox/CodeSearchIdx.pm index 97c563bd..ee2d9a47 100644 --- a/lib/PublicInbox/CodeSearchIdx.pm +++ b/lib/PublicInbox/CodeSearchIdx.pm @@ -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;