]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei/store: checkpoint commits mail_sync.sqlite3
authorEric Wong <e@80x24.org>
Mon, 7 Jun 2021 19:06:30 +0000 (19:06 +0000)
committerEric Wong <e@80x24.org>
Tue, 8 Jun 2021 04:47:25 +0000 (04:47 +0000)
We mainly rely on ->done with lei/store, but moving to
->checkpoint probably makes sense.  Note: over, msgmap, and
mail_sync all have slightly different transacation behavior;
perhaps they can be unified in the future.

lib/PublicInbox/LeiStore.pm

index 821782b9a4135c3e352979ed590e618e047da490..0b033e3e3095b8d3a0725ad6a2850daf5b9e9c73 100644 (file)
@@ -419,6 +419,9 @@ sub checkpoint {
        if (my $im = $self->{im}) {
                $wait ? $im->barrier : $im->checkpoint;
        }
+       if (my $lms = delete $self->{lms}) {
+               $lms->lms_commit;
+       }
        $self->{priv_eidx}->checkpoint($wait);
 }