From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id F094E1F934 for ; Sat, 3 Apr 2021 10:48:27 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/5] lei_store: update alternates on new epoch Date: Sat, 3 Apr 2021 10:48:23 +0000 Message-Id: <20210403104827.17003-2-e@80x24.org> In-Reply-To: <20210403104827.17003-1-e@80x24.org> References: <20210403104827.17003-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We'll just let the ExtSearchIdx code handle this uncommon case by doing a full commit. --- lib/PublicInbox/LeiStore.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm index d2dd4e7b..87082638 100644 --- a/lib/PublicInbox/LeiStore.pm +++ b/lib/PublicInbox/LeiStore.pm @@ -79,7 +79,10 @@ sub importer { my $old = -e $latest; PublicInbox::Import::init_bare($latest); my $git = PublicInbox::Git->new($latest); - $git->qx(qw(config core.sharedRepository 0600)) if !$old; + if (!$old) { + $git->qx(qw(config core.sharedRepository 0600)); + $self->done; # force eidx_init on next round + } my $packed_bytes = $git->packed_bytes; my $unpacked_bytes = $packed_bytes / $self->packing_factor; if ($unpacked_bytes >= $self->rotate_bytes) {