Re: [WIP PATCH] emacs: query: completion for from: in searches
[notmuch-archives.git] / 84 / c23e9b9422c59367bcb2bbe983759d2dc53237
1 Return-Path: <bremner@tethera.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id 50F036DE02DD\r
6  for <notmuch@notmuchmail.org>; Wed,  6 Apr 2016 03:27:29 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.02\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.02 tagged_above=-999 required=5 tests=[AWL=-0.009,\r
12   SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id PXJLn4erIQ7V for <notmuch@notmuchmail.org>;\r
16  Wed,  6 Apr 2016 03:27:20 -0700 (PDT)\r
17 Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
18  by arlo.cworth.org (Postfix) with ESMTPS id F32C46DE0243\r
19  for <notmuch@notmuchmail.org>; Wed,  6 Apr 2016 03:27:19 -0700 (PDT)\r
20 Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
21  (envelope-from <bremner@tethera.net>)\r
22  id 1ankgi-00033H-Vu; Wed, 06 Apr 2016 06:27:53 -0400\r
23 Received: (nullmailer pid 28740 invoked by uid 1000);\r
24  Wed, 06 Apr 2016 10:27:16 -0000\r
25 From: David Bremner <david@tethera.net>\r
26 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
27 Subject: [PATCH 2/3] test/atomicity: guard chert-only optimization\r
28 Date: Wed,  6 Apr 2016 07:27:10 -0300\r
29 Message-Id: <1459938431-28670-3-git-send-email-david@tethera.net>\r
30 X-Mailer: git-send-email 2.8.0.rc3\r
31 In-Reply-To: <1459938431-28670-1-git-send-email-david@tethera.net>\r
32 References: <1459855082-5715-2-git-send-email-david@tethera.net>\r
33  <1459938431-28670-1-git-send-email-david@tethera.net>\r
34 X-BeenThere: notmuch@notmuchmail.org\r
35 X-Mailman-Version: 2.1.20\r
36 Precedence: list\r
37 List-Id: "Use and development of the notmuch mail system."\r
38  <notmuch.notmuchmail.org>\r
39 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
40  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
41 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
42 List-Post: <mailto:notmuch@notmuchmail.org>\r
43 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
44 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
45  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
46 X-List-Received-Date: Wed, 06 Apr 2016 10:27:29 -0000\r
47 \r
48 This should potentially be updated to have an equivalent optimization\r
49 for the glass backend, but it in my unscientific tests, the glass backend\r
50 without the optimization is faster then the chert backend with.\r
51 ---\r
52  test/atomicity.py | 23 +++++++++++++----------\r
53  1 file changed, 13 insertions(+), 10 deletions(-)\r
54 \r
55 diff --git a/test/atomicity.py b/test/atomicity.py\r
56 index 01a4205..1ca52b9 100644\r
57 --- a/test/atomicity.py\r
58 +++ b/test/atomicity.py\r
59 @@ -29,16 +29,19 @@ class RenameBreakpoint(gdb.Breakpoint):\r
60          self.n = 0\r
61  \r
62      def stop(self):\r
63 -        # As an optimization, only consider snapshots after a Xapian\r
64 -        # has really committed.  Xapian overwrites record.base? as the\r
65 -        # last step in the commit, so keep an eye on their inumbers.\r
66 -        inodes = {}\r
67 -        for path in glob.glob('%s/.notmuch/xapian/record.base*' % maildir):\r
68 -            inodes[path] = os.stat(path).st_ino\r
69 -        if inodes == self.last_inodes:\r
70 -            # Continue\r
71 -            return False\r
72 -        self.last_inodes = inodes\r
73 +        xapiandir = '%s/.notmuch/xapian' % maildir\r
74 +        if os.path.isfile('%s/iamchert' % xapiandir):\r
75 +            # As an optimization, only consider snapshots after a\r
76 +            # Xapian has really committed.  The chert backend\r
77 +            # overwrites record.base? as the last step in the commit,\r
78 +            # so keep an eye on their inumbers.\r
79 +            inodes = {}\r
80 +            for path in glob.glob('%s/record.base*' % xapiandir):\r
81 +                inodes[path] = os.stat(path).st_ino\r
82 +            if inodes == self.last_inodes:\r
83 +                # Continue\r
84 +                return False\r
85 +            self.last_inodes = inodes\r
86  \r
87          # Save a backtrace in case the test does fail\r
88          backtrace = gdb.execute('backtrace', to_string=True)\r
89 -- \r
90 2.8.0.rc3\r
91 \r