From 5ec4f04207c42dd124de970e9e5ea608666a5e40 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 12 Oct 2013 12:15:37 +2100 Subject: [PATCH] Re: [PATCH 1/3] database: Add notmuch_database_compact_close --- c2/9eee674cdbeb29d0d1a87a4ed6cb501bc603b4 | 89 +++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 c2/9eee674cdbeb29d0d1a87a4ed6cb501bc603b4 diff --git a/c2/9eee674cdbeb29d0d1a87a4ed6cb501bc603b4 b/c2/9eee674cdbeb29d0d1a87a4ed6cb501bc603b4 new file mode 100644 index 000000000..8a633bed4 --- /dev/null +++ b/c2/9eee674cdbeb29d0d1a87a4ed6cb501bc603b4 @@ -0,0 +1,89 @@ +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 52B92431FAF + for ; Fri, 11 Oct 2013 08:15:54 -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 iO9aUefRIVrb for ; + Fri, 11 Oct 2013 08:15:48 -0700 (PDT) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 833BA431FAE + for ; Fri, 11 Oct 2013 08:15:48 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1VUeRJ-0007N0-9d; Fri, 11 Oct 2013 12:15:41 -0300 +Received: (nullmailer pid 28207 invoked by uid 1000); Fri, 11 Oct 2013 + 15:15:37 -0000 +From: David Bremner +To: Tomi Ollila , Ben Gamari , + notmuch@notmuchmail.org +Subject: Re: [PATCH 1/3] database: Add notmuch_database_compact_close +In-Reply-To: +References: <1380745848-4972-1-git-send-email-bgamari.foss@gmail.com> + <1380745848-4972-2-git-send-email-bgamari.foss@gmail.com> + +User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Fri, 11 Oct 2013 12:15:37 -0300 +Message-ID: <878uxzq1nq.fsf@unb.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: Fri, 11 Oct 2013 15:15:54 -0000 + +Tomi Ollila writes: +> +> From functionality point if view this looks safe to me. +> A followup patch could provide more information to the user +> is any of the following attemts fail, e.g. +> +> - if removing old database out of the way how to remove the new +> compacted database which can be considered as garbage now -- or +> how to rename it (which is a bit dangerous due to potential races) +> +> - if moving compacted database fails how to restore backup database... +> ... or how to move compacted database to where it was supposed to be +> moved so that database is usable... +> +> ... if the database is missing is new created from scratch, also in case +> there already is .notmuch directory ? +> +> ... should the database open try to open database from these alternative +> names in case opening from original name fails ? +> +> another, small change: +> +> case "${xapian_version}" in +> - 0.*|1.[01].*|1.2.[0-5]) +> + 0.*|1.[01].*|1.2.[0-5]|1.2.[0-5][^0-9]*) +> printf "No (only available with Xapian > 1.2.6).\n" ;; +> +> someone might do version like 1.2.4-abc but probably not 1.2.04 (nor 1.2a.4) +> +> (side note: case $x in [^...]) works with bash (and ksh&zsh, but not with dash) + +OK, let's leave those merged, and clean up these issues before the next +release. + +d -- 2.26.2