dumping ground for random patches and texts
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: spew@80x24.org
Subject: [PATCH] trace
Date: Tue,  6 Jul 2021 13:36:03 +0000	[thread overview]
Message-ID: <20210706133603.20877-1-e@80x24.org> (raw)

---
 lib/PublicInbox/LeiSavedSearch.pm | 3 +++
 lib/PublicInbox/LeiToMail.pm      | 1 +
 2 files changed, 4 insertions(+)

diff --git a/lib/PublicInbox/LeiSavedSearch.pm b/lib/PublicInbox/LeiSavedSearch.pm
index 929380ed..43ab247c 100644
--- a/lib/PublicInbox/LeiSavedSearch.pm
+++ b/lib/PublicInbox/LeiSavedSearch.pm
@@ -178,6 +178,7 @@ sub is_dup {
 	}
 	my $blob = $smsg ? $smsg->{blob} : git_sha(1, $eml)->hexdigest;
 	$lk //= $self->lock_for_scope_fast;
+	warn "$blob exists" if $oidx->blob_exists($blob);
 	return 1 if $oidx->blob_exists($blob);
 	if (my $xoids = PublicInbox::LeiSearch::xoids_for($self, $eml, 1)) {
 		for my $docid (values %$xoids) {
@@ -187,6 +188,7 @@ sub is_dup {
 		if ($self->{-dedupe_oid}) {
 			exists $xoids->{$blob} ? 1 : undef;
 		} else {
+			warn "xoids for hit\n";
 			1;
 		}
 	} else {
@@ -197,6 +199,7 @@ sub is_dup {
 			$smsg->populate($eml);
 		}
 		$smsg->{blob} //= $blob;
+		warn "NEW $blob";
 		$oidx->begin_lazy;
 		$smsg->{num} = $oidx->adj_counter('eidx_docid', '+');
 		$oidx->add_overview($eml, $smsg);
diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm
index b9405c0c..608bee7f 100644
--- a/lib/PublicInbox/LeiToMail.pm
+++ b/lib/PublicInbox/LeiToMail.pm
@@ -297,6 +297,7 @@ sub _maildir_write_cb ($$) {
 	sub { # for git_to_mail
 		my ($bref, $smsg, $eml) = @_;
 		$dst // return $lei->fail; # dst may be undef-ed in last run
+		warn "dedupe=$dedupe $eml";
 		return if $dedupe && $dedupe->is_dup($eml //
 						PublicInbox::Eml->new($$bref),
 						$smsg);

             reply	other threads:[~2021-07-06 13:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 13:36 Eric Wong [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-03-31  9:56 [PATCH] trace Eric Wong

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210706133603.20877-1-e@80x24.org \
    --to=e@80x24.org \
    --cc=spew@80x24.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.
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).