]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei_store: update alternates on new epoch
authorEric Wong <e@80x24.org>
Sat, 3 Apr 2021 10:48:23 +0000 (10:48 +0000)
committerEric Wong <e@80x24.org>
Sat, 3 Apr 2021 18:38:44 +0000 (18:38 +0000)
We'll just let the ExtSearchIdx code handle this uncommon case
by doing a full commit.

lib/PublicInbox/LeiStore.pm

index d2dd4e7bfec0d4bb5e2524b71ad242e6b7900be3..870826380c0c74248dab1acdcb81df3cd828f7a0 100644 (file)
@@ -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) {