user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <>
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: <> (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/ | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/PublicInbox/ b/lib/PublicInbox/
index 5c161b9a..f7462aa7 100644
--- a/lib/PublicInbox/
+++ b/lib/PublicInbox/
@@ -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:

  List information:

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

  git send-email \ \ \ \

* 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

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).