user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 4/4] extsearchidx: emit diagnostics for missing blobs
  2021-10-02 11:18  6% [PATCH 0/4] lei mail-diff and other small things Eric Wong
@ 2021-10-02 11:18  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-10-02 11:18 UTC (permalink / raw)
  To: meta

I'm not sure why they weren't emitted, earlier.
---
 lib/PublicInbox/ExtSearchIdx.pm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm
index 972049e420e2..eb7c3d67e072 100644
--- a/lib/PublicInbox/ExtSearchIdx.pm
+++ b/lib/PublicInbox/ExtSearchIdx.pm
@@ -223,13 +223,16 @@ sub _blob_missing ($$) { # called when $smsg->{blob} is bad
 	my $xref3 = $self->{oidx}->get_xref3($smsg->{num});
 	my @keep = grep(!/:$smsg->{blob}\z/, @$xref3);
 	if (@keep) {
+		warn "E: $smsg->{blob} gone, removing #$smsg->{num}\n";
 		$keep[0] =~ /:([a-f0-9]{40,}+)\z/ or
 			die "BUG: xref $keep[0] has no OID";
 		my $oidhex = $1;
 		$self->{oidx}->remove_xref3($smsg->{num}, $smsg->{blob});
-		my $upd = $self->{oidx}->update_blob($smsg, $oidhex);
-		my $saved = $self->{oidx}->get_art($smsg->{num});
+		$self->{oidx}->update_blob($smsg, $oidhex) or warn <<EOM;
+E: #$smsg->{num} gone ($smsg->{blob} => $oidhex)
+EOM
 	} else {
+		warn "E: $smsg->{blob} gone, removing #$smsg->{num}\n";
 		$self->{oidx}->delete_by_num($smsg->{num});
 	}
 }

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/4] lei mail-diff and other small things
@ 2021-10-02 11:18  6% Eric Wong
  2021-10-02 11:18  7% ` [PATCH 4/4] extsearchidx: emit diagnostics for missing blobs Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-10-02 11:18 UTC (permalink / raw)
  To: meta

1/4 doesn't matter, atm;
2/4 is something I finally got around to doing :x
3/4 is long overdue, I think (and a result of 2/4)
Not sure why 4/4 wasn't done earlier, either, I guess
I never notice missing blobs.

Eric Wong (4):
  extsearchidx: attach_config: set {ibx_map} value to $ibx
  lei mail-diff: diagnostic command to diff mail contents
  content_hash: normalize whitespace before hashing addresses
  extsearchidx: emit diagnostics for missing blobs

 MANIFEST                        |   1 +
 lib/PublicInbox/ContentHash.pm  |   7 +-
 lib/PublicInbox/ExtSearchIdx.pm |   8 ++-
 lib/PublicInbox/LEI.pm          |   5 ++
 lib/PublicInbox/LeiInput.pm     |   6 ++
 lib/PublicInbox/LeiMailDiff.pm  | 111 ++++++++++++++++++++++++++++++++
 lib/PublicInbox/LeiRediff.pm    |  63 +++++++++---------
 7 files changed, 167 insertions(+), 34 deletions(-)
 create mode 100644 lib/PublicInbox/LeiMailDiff.pm

^ permalink raw reply	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-10-02 11:18  6% [PATCH 0/4] lei mail-diff and other small things Eric Wong
2021-10-02 11:18  7% ` [PATCH 4/4] extsearchidx: emit diagnostics for missing blobs 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).