From 2833f2adeb224a83d731deaa717e1969e5bf9e62 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 25 Oct 2021 08:59:19 +0000 Subject: lei_to_mail: write directly to mail_sync.sqlite3 No need to go through the lei/store process when we write mail_sync.sqlite3. This ought to reduce ENOBUFS errors (and the sleep workaround) on RAM-starved systems. --- lib/PublicInbox/LeiStore.pm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/PublicInbox/LeiStore.pm') diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm index f1316229..66049dfe 100644 --- a/lib/PublicInbox/LeiStore.pm +++ b/lib/PublicInbox/LeiStore.pm @@ -265,11 +265,6 @@ sub _lms_rw ($) { # it is important to have eidx processes open before lms }; } -sub set_sync_info { - my ($self, $oidhex, $folder, $id) = @_; - _lms_rw($self)->set_src(pack('H*', $oidhex), $folder, $id); -} - sub _remove_if_local { # git->cat_async arg my ($bref, $oidhex, $type, $size, $self) = @_; $self->{im}->remove($bref) if $bref; @@ -349,7 +344,7 @@ sub add_eml { $smsg->{-eidx_git} = $eidx->git if !$self->{-fake_im}; my $im_mark = $im->add($eml, undef, $smsg); if ($vmd && $vmd->{sync_info}) { - set_sync_info($self, $smsg->{blob}, @{$vmd->{sync_info}}); + _lms_rw($self)->set_src($smsg->oidbin, @{$vmd->{sync_info}}); } unless ($im_mark) { # duplicate blob returns undef return unless wantarray; -- cgit v1.2.3-24-ge0c7