From 6681629b7feaac0ffc5d85bde316af1761f674c9 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Sun, 27 Oct 2013 23:48:14 +0200 Subject: [PATCH] Re: [PATCH 3/3] compact: Provide user with more error feedback --- 5b/e6286844716b205246beaca445b9222e953b95 | 102 ++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 5b/e6286844716b205246beaca445b9222e953b95 diff --git a/5b/e6286844716b205246beaca445b9222e953b95 b/5b/e6286844716b205246beaca445b9222e953b95 new file mode 100644 index 000000000..67286109f --- /dev/null +++ b/5b/e6286844716b205246beaca445b9222e953b95 @@ -0,0 +1,102 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 33DB7429E2E + for ; Sun, 27 Oct 2013 14:48:28 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id fQ98vPSntiia for ; + Sun, 27 Oct 2013 14:48:22 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 94FCD429E29 + for ; Sun, 27 Oct 2013 14:48:22 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 99D841000B2; + Sun, 27 Oct 2013 23:48:14 +0200 (EET) +From: Tomi Ollila +To: Ben Gamari , notmuch@notmuchmail.org +Subject: Re: [PATCH 3/3] compact: Provide user with more error feedback +In-Reply-To: <1382905807-22220-3-git-send-email-bgamari.foss@gmail.com> +References: <1382905807-22220-1-git-send-email-bgamari.foss@gmail.com> + <1382905807-22220-3-git-send-email-bgamari.foss@gmail.com> +User-Agent: Notmuch/0.16+115~g11c2ff5 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 27 Oct 2013 21:48:28 -0000 + +On Sun, Oct 27 2013, Ben Gamari wrote: + +> Provide instructions on what to do when we couldn't move the compacted +> database into place. +> +> Signed-off-by: Ben Gamari +> --- +> lib/database.cc | 18 +++++++++++++++++- +> 1 file changed, 17 insertions(+), 1 deletion(-) +> +> diff --git a/lib/database.cc b/lib/database.cc +> index 57c2292..6f9fed1 100644 +> --- a/lib/database.cc +> +++ b/lib/database.cc +> @@ -938,7 +938,23 @@ notmuch_database_compact (const char* path, +> } +> +> if (rename(compact_xapian_path, xapian_path)) { +> - fprintf (stderr, "Error moving compacted database\n"); +> + fprintf (stderr, "Error moving compacted database into place: %s\n", strerror(errno)); +> + fprintf (stderr, "\n"); +> + fprintf (stderr, "Encountered error %s while moving the compacted database,\n", +> + strerror(errno)); + +You probably missed my comments in id:m2d2mz7qv7.fsf@guru.guru-group.fi ? + +Tomi + +> + fprintf (stderr, "\n"); +> + fprintf (stderr, " %s\n", compact_xapian_path); +> + fprintf (stderr, "\n"); +> + fprintf (stderr, "to\n"); +> + fprintf (stderr, "\n"); +> + fprintf (stderr, " %s\n", xapian_path); +> + fprintf (stderr, "\n"); +> + fprintf (stderr, "Please identify the reason for this and move the compacted database into place manually.\n"); +> + if (backup_path != NULL) { +> + fprintf (stderr, "Otherwise, you can revert to the backup database located at,\n"); +> + fprintf (stderr, "\n"); +> + fprintf (stderr, " %s\n", backup_path); +> + } +> ret = NOTMUCH_STATUS_FILE_ERROR; +> goto DONE; +> } +> -- +> 1.8.3.2 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2