[PATCH RFC?] Compactification support
authorBen Gamari <bgamari.foss@gmail.com>
Mon, 20 Aug 2012 15:31:41 +0000 (11:31 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:09 +0000 (09:49 -0800)
86/f6feba03b274263ffe167845492894aae35ffb [new file with mode: 0644]

diff --git a/86/f6feba03b274263ffe167845492894aae35ffb b/86/f6feba03b274263ffe167845492894aae35ffb
new file mode 100644 (file)
index 0000000..dd1b7b8
--- /dev/null
@@ -0,0 +1,79 @@
+Return-Path: <bgamari.foss@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 8A3CA431FBD\r
+       for <notmuch@notmuchmail.org>; Mon, 20 Aug 2012 08:31:54 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id vh6Lf9NmDh-p for <notmuch@notmuchmail.org>;\r
+       Mon, 20 Aug 2012 08:31:54 -0700 (PDT)\r
+Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com\r
+       [209.85.220.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 0942A431FAE\r
+       for <notmuch@notmuchmail.org>; Mon, 20 Aug 2012 08:31:53 -0700 (PDT)\r
+Received: by vcbfl17 with SMTP id fl17so5583555vcb.26\r
+       for <notmuch@notmuchmail.org>; Mon, 20 Aug 2012 08:31:52 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:subject:date:message-id:x-mailer;\r
+       bh=MFEPxHraUCgLMR5OzuCb+g1CGqyr/uZsSdSB7UoorSM=;\r
+       b=RbZoI4JUydwm9R5f/oB6XEmxPq91xNgDwJQdILsS2iRC0rJIeFKK9GF/P89YaZ36lu\r
+       rbMN/Xy3qfZm/zMJYSwXLWD0AlnERfBvZ7uAj0RjI7b4jZ2ddPliazTUJ/JQbTBvXxq/\r
+       XPI1Gqg+jgOm1WmTbrtXxy9sXg6hRcOkqCYn7UdaRgMldny9FDsS0eS6vHon2Cy4VHa4\r
+       Qq+1sR3/CTE5jGPSuRn0cyMwhvNJnIob+dLUKPK1JCDoF5+gimCRx3CtwJ0jhrf7c1+T\r
+       t0B7Dr3N4nhwLekim3mW07/Y0h9PxdmyjO8tZzcxmDV64Vgwjz8YGF+vhsSiL/Hs3Dbi\r
+       2aYw==\r
+Received: by 10.221.0.74 with SMTP id nl10mr10544846vcb.47.1345476712196;\r
+       Mon, 20 Aug 2012 08:31:52 -0700 (PDT)\r
+Received: from localhost.localdomain\r
+       (pool-108-8-230-85.spfdma.east.verizon.net. [108.8.230.85])\r
+       by mx.google.com with ESMTPS id g10sm5430786vdk.2.2012.08.20.08.31.50\r
+       (version=SSLv3 cipher=OTHER); Mon, 20 Aug 2012 08:31:51 -0700 (PDT)\r
+From: Ben Gamari <bgamari.foss@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH RFC?] Compactification support\r
+Date: Mon, 20 Aug 2012 11:31:41 -0400\r
+Message-Id: <1345476704-17091-1-git-send-email-bgamari.foss@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.5\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 20 Aug 2012 15:31:54 -0000\r
+\r
+\r
+Here is a small patchset adding support for database compaction when supported\r
+by Xapian. Here I add a function which both compacts and closes the database.\r
+This is due to it being not entirely clear whether one is allowed to compact\r
+the database while it is being held open for read/write.\r
+\r
+\r
+Since it is nice to be able to hold the read/write lock while compacting, I\r
+close the database only after the compaction has finished which Xapian seems to\r
+be fine with. That being said, the database is moved after compaction, so it seems appropriate to lump compaction in with closing the database.\r
+\r
+Lastly, I wasn't entirely sure whether/how Xapian's status messages should be\r
+presented to the user. At the moment I simply spit them out on stderr. Perhaps\r
+I should just pass a callback to notmuch_database_close_compact and leave this\r
+to the caller?\r
+\r
+Cheers,\r
+\r
+- Ben\r
+\r