From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: Re: [PATCH 4/4] lei reindex: new command to reindex lei/store
Date: Thu, 18 Aug 2022 07:22:46 +0000 [thread overview]
Message-ID: <20220818072246.GA28873@dcvr> (raw)
In-Reply-To: <20220817093317.3820774-5-e@80x24.org>
Eric Wong <e@80x24.org> wrote:
> index d49746cb..277ed6bd 100644
> --- a/lib/PublicInbox/LeiStore.pm
> +++ b/lib/PublicInbox/LeiStore.pm
> @@ -335,6 +335,36 @@ sub _docids_and_maybe_kw ($$) {
> ($docids, [ sort keys %$kw ]);
> }
>
> +sub _reindex_1 { # git->cat_async callback
> + my ($bref, $hex, $type, $size, $smsg) = @_;
> + my ($self, $eidx, $tl) = delete @$smsg{qw(-self -eidx -tl)};
> + $bref //= _lms_rw($self)->local_blob($hex, 1);
> + if ($bref) {
> + my $eml = PublicInbox::Eml->new($bref);
> + $smsg->{-merge_vmd} = 1; # preserve existing keywords
> + $eidx->idx_shard($smsg->{num})->index_eml($eml, $smsg);
> + } else {
> + warn("E: $type $hex\n");
This path has been worrying me a bit, I hit it quite a bit on
one of my systems since there was a time when external-only
messages were fully-indexed inside lei/store. Nowadays,
duplicate indexing is avoided...
prev parent reply other threads:[~2022-08-18 7:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 9:33 [PATCH 0/4] lei reindex, minor tweaks Eric Wong
2022-08-17 9:33 ` [PATCH 1/4] searchidx: fix spelling error in comment Eric Wong
2022-08-17 9:33 ` [PATCH 2/4] lei inspect: less scary exception for invalid "docid:" inspect Eric Wong
2022-08-17 9:33 ` [PATCH 3/4] lei/store: reduce work when accessing mail_sync.sqlite3 Eric Wong
2022-08-17 9:33 ` [PATCH 4/4] lei reindex: new command to reindex lei/store Eric Wong
2022-08-18 7:22 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220818072246.GA28873@dcvr \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).