user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@yhbt.net>
To: meta@public-inbox.org
Subject: [PATCH] searchidx: v1: fix retries when Xapian and Msgmap are out-of-sync
Date: Fri,  5 Jun 2020 02:01:10 +0000	[thread overview]
Message-ID: <20200605020110.11563-1-e@yhbt.net> (raw)

We forcibly stop git-log here, so erroring out on git-log close
failures is wrong since it sees SIGPIPE.  Noticed while
reindexing a large v1 inbox for IMAP changes.

Fixes: b32b47fb12a3043d ("index: "git log" failures are fatal")
---
 lib/PublicInbox/SearchIdx.pm | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm
index 5c161b9a..f7462aa7 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -754,10 +754,7 @@ sub _index_sync {
 	my $xdb = $self->begin_txn_lazy;
 	my $mm = _msgmap_init($self);
 	do {
-		if ($xlog) {
-			close($xlog) or die "git log failed: \$?=$?";
-			$xlog = undef;
-		}
+		$xlog = undef; # stop previous git-log via SIGPIPE
 		$last_commit = _last_x_commit($self, $mm);
 		$lx = reindex_from($opts->{reindex}, $last_commit);
 

                 reply	other threads:[~2020-06-05  2:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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: http://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=20200605020110.11563-1-e@yhbt.net \
    --to=e@yhbt.net \
    --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).