diff options
author | Eric Wong <e@80x24.org> | 2021-09-18 09:33:25 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-18 20:25:27 +0000 |
commit | 47d4e53734820b4e5a2f6cfa29056329e387ef22 (patch) | |
tree | 78328c0d68e3e329fa8c57c3300f8273bc122b89 /lib/PublicInbox/LeiInspect.pm | |
parent | 7b7939d47b336fb7d8c4387858e620dbc218bb1e (diff) | |
download | public-inbox-47d4e53734820b4e5a2f6cfa29056329e387ef22.tar.gz |
Since 44917fdd24a8bec1 ("lei_mail_sync: do not use transactions"), relying on lei/store to serialize access was a pointless endeavor. Rely on flock(2) to serialize multiple writers since (in my experience) it's the easiest way to deal with parallel writers when using SQLite. This allows us to simplify existing callers while speeding up 'lei refresh-mail-sync --all=local' by 5% or so.
Diffstat (limited to 'lib/PublicInbox/LeiInspect.pm')
-rw-r--r-- | lib/PublicInbox/LeiInspect.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/PublicInbox/LeiInspect.pm b/lib/PublicInbox/LeiInspect.pm index 2385f7f8..f06cea61 100644 --- a/lib/PublicInbox/LeiInspect.pm +++ b/lib/PublicInbox/LeiInspect.pm @@ -18,7 +18,7 @@ sub inspect_blob ($$) { my $oidbin = pack('H*', $oidhex); my @docids = $lse ? $lse->over->oidbin_exists($oidbin) : (); $ent->{'lei/store'} = \@docids if @docids; - my $lms = $lse->lms; + my $lms = $lei->lms; if (my $loc = $lms ? $lms->locations_for($oidbin) : undef) { $ent->{'mail-sync'} = $loc; } @@ -29,8 +29,7 @@ sub inspect_blob ($$) { sub inspect_imap_uid ($$) { my ($lei, $uid_uri) = @_; my $ent = {}; - my $lse = $lei->{lse} or return $ent; - my $lms = $lse->lms or return $ent; + my $lms = $lei->lms or return $ent; my $oidhex = $lms->imap_oid($lei, $uid_uri); if (ref(my $err = $oidhex)) { # art2folder error $lei->qerr(@{$err->{qerr}}) if $err->{qerr}; |