diff options
author | Eric Wong <e@80x24.org> | 2024-04-12 18:04:12 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2024-04-13 10:06:13 +0000 |
commit | 7af35b29074567fcc8c7e59260e72b66ea8c8436 (patch) | |
tree | 7bcd37d0ce5b9b5d3a29a3cbd6f0030cae35641c /lib | |
parent | 205f67d4d7bedbec0901e8b9b586844fd0b2a28d (diff) | |
download | public-inbox-7af35b29074567fcc8c7e59260e72b66ea8c8436.tar.gz |
This should improve `lei blob' and `lei rediff' functionality for folks relying on `lei index' and allows future work to improve parallelism via checkpointing in lei/store.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/LeiRemote.pm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/PublicInbox/LeiRemote.pm b/lib/PublicInbox/LeiRemote.pm index 559fb8d5..ddcaf2c9 100644 --- a/lib/PublicInbox/LeiRemote.pm +++ b/lib/PublicInbox/LeiRemote.pm @@ -67,9 +67,16 @@ sub base_url { "$_[0]->{uri}" } sub smsg_eml { my ($self, $smsg) = @_; - if (my $bref = $self->{lei}->ale->git->cat_file($smsg->{blob})) { - return PublicInbox::Eml->new($bref); - } + my $bref = $self->{lei}->ale->git->cat_file($smsg->{blob}) // do { + my $lms = $self->{lei}->lms; + ($lms ? $lms->local_blob($smsg->{blob}, 1) : undef) // do { + my $sto = $self->{lei}->{sto} // + $self->{lei}->_lei_store; + $sto && $sto->{-wq_s1} ? + $sto->wq_do('cat_blob', $smsg->{blob}) : undef; + } + }; + return PublicInbox::Eml->new($bref) if $bref; warn("E: $self->{uri} $smsg->{blob} gone <$smsg->{mid}>\n"); undef; } |