* [PATCH 0/4] extindex tweaks and small fixes
@ 2021-10-17 9:52 6% Eric Wong
2021-10-17 9:52 7% ` [PATCH 2/4] extindex: retry sync_inbox before reindex Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-10-17 9:52 UTC (permalink / raw)
To: meta
Probably nothing of note, but some extra safety and
redundant work elimination.
Eric Wong (4):
extindex: use localtime to display lock time
extindex: retry sync_inbox before reindex
extindex: guard against false mismatch unrefs
extindex: better locations for {quit} checks
lib/PublicInbox/ExtSearchIdx.pm | 31 ++++++++++++++++++++++++-------
1 file changed, 24 insertions(+), 7 deletions(-)
^ permalink raw reply [relevance 6%]
* [PATCH 2/4] extindex: retry sync_inbox before reindex
2021-10-17 9:52 6% [PATCH 0/4] extindex tweaks and small fixes Eric Wong
@ 2021-10-17 9:52 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-10-17 9:52 UTC (permalink / raw)
To: meta
Ensure the num highwater mark of the target inbox is stable
before using it. Otherwise we may end up repeating work
done to index a message.
---
lib/PublicInbox/ExtSearchIdx.pm | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm
index 67d720368922..daff656d1ac5 100644
--- a/lib/PublicInbox/ExtSearchIdx.pm
+++ b/lib/PublicInbox/ExtSearchIdx.pm
@@ -859,14 +859,20 @@ sub _reindex_check_ibx ($$$) {
my $slice = 10000;
my $opt = { limit => $slice };
my ($beg, $end) = (1, $slice);
- my $err = sync_inbox($self, $sync, $ibx) and return;
- my $max = $ibx->mm->num_highwater;
+ my $ekey = $ibx->eidx_key;
+ my ($max, $max0);
+ do {
+ $max0 = $ibx->mm->num_highwater;
+ sync_inbox($self, $sync, $ibx) and return; # warned
+ $max = $ibx->mm->num_highwater;
+ return if $sync->{quit};
+ } while ($max > $max0 &&
+ warn("# $ekey moved $max0..$max, resyncing..\n"));
$end = $max if $end > $max;
# first, check if we missed any messages in target $ibx
my $msgs;
my $pr = $sync->{-opt}->{-progress};
- my $ekey = $ibx->eidx_key;
local $sync->{-regen_fmt} = "$ekey checking %u/$max\n";
${$sync->{nr}} = 0;
my $fast = $sync->{-opt}->{fast};
^ permalink raw reply related [relevance 7%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-10-17 9:52 6% [PATCH 0/4] extindex tweaks and small fixes Eric Wong
2021-10-17 9:52 7% ` [PATCH 2/4] extindex: retry sync_inbox before reindex Eric Wong
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).