Re: More ideas about logging.
authorEthan Glasser-Camp <ethan.glasser.camp@gmail.com>
Fri, 12 Oct 2012 16:28:36 +0000 (12:28 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:44 +0000 (09:49 -0800)
f9/f7ab06d33929c66177ee8a50c96865dfe45fdf [new file with mode: 0644]

diff --git a/f9/f7ab06d33929c66177ee8a50c96865dfe45fdf b/f9/f7ab06d33929c66177ee8a50c96865dfe45fdf
new file mode 100644 (file)
index 0000000..d99b152
--- /dev/null
@@ -0,0 +1,91 @@
+Return-Path: <ethan.glasser.camp@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 7A041431FAF\r
+       for <notmuch@notmuchmail.org>; Fri, 12 Oct 2012 09:28:46 -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 qpvbgY0WlFRd for <notmuch@notmuchmail.org>;\r
+       Fri, 12 Oct 2012 09:28:46 -0700 (PDT)\r
+Received: from mail-qc0-f181.google.com (mail-qc0-f181.google.com\r
+       [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 89BA0431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 12 Oct 2012 09:28:45 -0700 (PDT)\r
+Received: by mail-qc0-f181.google.com with SMTP id x40so2673074qcp.26\r
+       for <notmuch@notmuchmail.org>; Fri, 12 Oct 2012 09:28:44 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
+       :message-id:mime-version:content-type;\r
+       bh=HX3IhTZ+UaoBgoFPPCeEiI81s707BL3CzA4xEMp9NCg=;\r
+       b=l3mdlLPN2I1b21vgrwEKOkT3SQarLbYKJVl5oyamplCwaW05CA2WZmHZNPxbaFgmP+\r
+       oehUDy+Pdvlo26Jy+S5AoLnIzVEX0eL2orCYVfRyTYe++ZvreaU3wXYRO25KekYCuQ9P\r
+       wIiNaGxbV0ZDipWJaX2Pv1uA09IIRwfMz0TB12Kvdfxi9sSbklwK547g5ZfvLO5AvlGq\r
+       huA1YdCUETiafelySQ0PPb2plLxfyikZE9HD42ERRW22QmbIIJlTjsoTujYM3HLRMQvD\r
+       NGyXez14WADmY59N5h9zb5hU9YQ6yegNcp/olcW6jJjKwHcfeqF3aczBEzYABCHhGox1\r
+       Td4A==\r
+Received: by 10.224.60.17 with SMTP id n17mr8242158qah.63.1350059324414;\r
+       Fri, 12 Oct 2012 09:28:44 -0700 (PDT)\r
+Received: from smtp.gmail.com (p70-80.acedsl.com. [66.114.70.80])\r
+       by mx.google.com with ESMTPS id jw1sm6781053qeb.13.2012.10.12.09.28.41\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Fri, 12 Oct 2012 09:28:42 -0700 (PDT)\r
+From: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>\r
+To: Austin Clements <amdragon@MIT.EDU>, David Bremner <bremner@debian.org>\r
+Subject: Re: More ideas about logging.\r
+In-Reply-To: <20111216040722.GC12245@mit.edu>\r
+References: <87obv9i7y3.fsf@zancas.localnet> <20111216040722.GC12245@mit.edu>\r
+User-Agent: Notmuch/0.14+45~g6ea9330 (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Fri, 12 Oct 2012 12:28:36 -0400\r
+Message-ID: <87y5jbac3v.fsf@betacantrips.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Cc: Olly Betts <olly@survex.com>, Notmuch Mail <notmuch@notmuchmail.org>\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: Fri, 12 Oct 2012 16:28:46 -0000\r
+\r
+Austin Clements <amdragon@MIT.EDU> writes:\r
+\r
+> The trouble with this approach is that the OS doesn't have to flush\r
+> logfile to the disk platters in any particular order relative to the\r
+> updates to Xapian.  So, after someone trips over your plug, you could\r
+> come back with Xapian saying you have 500 log entries when your\r
+> logfile comes back with only 20.  The only way I know of to fix this\r
+> is to fsync after the logfile write, which would obviously have\r
+> performance issues.  But maybe there are cleverer ways?\r
+\r
+Sorry to jump in almost a year after the fact, but..\r
+\r
+How bad do you think those performance issues are going to be? I don't\r
+see them as prohibitive, even in the case where you write a log entry\r
+for every message being tagged. Xapian's doing an fsync each time we\r
+commit, isn't it? (Or is there some cute trick where it rename()s the\r
+database?)\r
+\r
+If, instead of truncating, you replay logged operations, I think you can\r
+get away with just writing log entries for user-level operations (like\r
+"notmuch tag +mytag to:somequery") which could touch a lot of\r
+messages. This would then only require one fsync on the log file before\r
+doing a lot of tag updates.\r
+\r
+Ethan\r