[PATCH 6/8] CLI: refactor dumping of tags.
[notmuch-archives.git] / 32 / d2112d4320922f98178c5ac4a1f9109bc685c4
1 Return-Path: <eg@gaute.vetsj.com>\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 olra.theworths.org (Postfix) with ESMTP id 0E22B431FBF\r
6         for <notmuch@notmuchmail.org>; Wed, 23 Apr 2014 04:54:29 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id 68tG4zIGmrQc for <notmuch@notmuchmail.org>;\r
16         Wed, 23 Apr 2014 04:54:22 -0700 (PDT)\r
17 Received: from mail-la0-f41.google.com (mail-la0-f41.google.com\r
18         [209.85.215.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 3C76B431FBD\r
21         for <notmuch@notmuchmail.org>; Wed, 23 Apr 2014 04:54:22 -0700 (PDT)\r
22 Received: by mail-la0-f41.google.com with SMTP id gl10so679859lab.0\r
23         for <notmuch@notmuchmail.org>; Wed, 23 Apr 2014 04:54:19 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=1e100.net; s=20130820;\r
26         h=x-gm-message-state:content-type:from:to:cc:subject:in-reply-to\r
27         :references:date:message-id:user-agent:content-transfer-encoding;\r
28         bh=xtoOnRQWbi/IkmS+Wsi0ABHTYggeJzf+seFlJK7O6ng=;\r
29         b=MC5jgOzjbvmvDnzHvCfo9OBbz6+Z8Iv8BN1cy6ZAvnh7kDAzDdt/UYCEwEPZiG5KzD\r
30         Rc3qYwtQRaWInHi4fQkDFvkijqm5E0JTGrr7f7xr8U3PVA/6J5Yp/nicJ6yzGZ5BuqyB\r
31         sFdvrjr6gUWqCiEE6cH7Sf/k19Mk0NG8q8f3M86//id4LfrtVjVz4qzDYX8JllxAbxFL\r
32         fpdkTEprvpYilj280e1L9Myqpr97vNjHPwP5eZ1FbgCMiFa8TR+4ApMt0Y/NcngWjcQF\r
33         GfsuQQsOhP8qDsQU4azQs/DCJO9u/oGA91K/jwDMeMGhHllMAtpjaAuAyulI23yEC/7k\r
34         WQJA==\r
35 X-Gm-Message-State:\r
36  ALoCoQlV45D3SXtic/4dGPC/kAC98UfArsn8ZqtPD8iLMwvizByz3qHAbw/r7gRFZgsPhT33ufL4\r
37 X-Received: by 10.152.22.72 with SMTP id b8mr36745laf.63.1398254058245;\r
38         Wed, 23 Apr 2014 04:54:18 -0700 (PDT)\r
39 Received: from localhost ([128.39.46.106])\r
40         by mx.google.com with ESMTPSA id u4sm730335laj.2.2014.04.23.04.54.16\r
41         for <multiple recipients>\r
42         (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
43         Wed, 23 Apr 2014 04:54:16 -0700 (PDT)\r
44 Content-Type: text/plain; charset=UTF-8\r
45 From: Gaute Hope <eg@gaute.vetsj.com>\r
46 To: David Mazieres expires 2014-07-22 PDT\r
47         <mazieres-eqbxrjbqrn7vs5xdx45e9hkucs@temporary-address.scs.stanford.edu>\r
48 Subject: Re: [PATCH] Add configurable changed tag to messages that have been\r
49         changed on disk\r
50 In-reply-to: <87ioq0l8th.fsf@ta.scs.stanford.edu>\r
51 References: <1396800683-9164-1-git-send-email-eg@gaute.vetsj.com>\r
52         <87wqf2gqig.fsf@ta.scs.stanford.edu> <1397140962-sup-6514@qwerzila>\r
53         <87wqexnqvb.fsf@ta.scs.stanford.edu> <1397163239-sup-5101@qwerzila>\r
54         <87d2g9ja0h.fsf@maritornes.cs.unb.ca> <1398237865-sup-624@qwerzila>\r
55         <87ioq0l8th.fsf@ta.scs.stanford.edu>\r
56 Date: Wed, 23 Apr 2014 13:53:10 +0200\r
57 Message-Id: <1398253735-sup-5203@qwerzila>\r
58 User-Agent: Sup/git\r
59 Content-Transfer-Encoding: 8bit\r
60 Cc: notmuch <notmuch@notmuchmail.org>\r
61 X-BeenThere: notmuch@notmuchmail.org\r
62 X-Mailman-Version: 2.1.13\r
63 Precedence: list\r
64 List-Id: "Use and development of the notmuch mail system."\r
65         <notmuch.notmuchmail.org>\r
66 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
68 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
69 List-Post: <mailto:notmuch@notmuchmail.org>\r
70 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
71 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
72         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
73 X-List-Received-Date: Wed, 23 Apr 2014 11:54:29 -0000\r
74 \r
75 Excerpts from David Mazieres's message of 2014-04-23 11:00:10 +0200:\r
76 > Gaute Hope <eg@gaute.vetsj.com> writes:\r
77 >\r
78 > > A db-tick or a _good_ ctime solution can as far as I can see solve both\r
79 > > David M's (correct me if I am wrong) and my purposes, as well as\r
80 > > probably have more use cases in the future. It would even be an\r
81 > > interesting direct search: show me everything that changed lately,\r
82 > > sorted.\r
83 >\r
84 > I could live with a db-tick scheme.  I would prefer a ctime scheme,\r
85 > since then I can answer questions such as "what has changed in the last\r
86 > five minutes"?  I mean all kinds of other stuff starts to break if your\r
87 > clock goes backwards on a mail server machine, not the least of which is\r
88 > that incremental backups will fail silently, so you risk losing your\r
89 > mail.\r
90 >\r
91 > A middle ground might be to use the maximum of two values: 1) the\r
92 > time-of-day at which notmuch started executing, and 2) the highest ctime\r
93 > in the database plus 100 microseconds (leaving plenty of slop to store\r
94 > timestamps as IEEE doubles with 52 significant bits).  Since the values\r
95 > will be Btree-indexed, computing the max plus one will be cheap.\r
96 >\r
97 > Incidentally, if you are really this paranoid about time stamps, it\r
98 > should bother you that notmuch's directory timestamps only have one\r
99 > second granularity.  It's not that hard to get a new message delivered\r
100 > in the same second that notmuch new finished running.  In my\r
101 > synchronizer, I convert st_mtim (a struct timespec) into a double and\r
102 > keep that plus size in the database to decide if I need to re-hash\r
103 > files.  But for directories, I'm stuck with NOTMUCH_VALUE_TIMESTAMP,\r
104 > which are quantized to the second.  (Ironically, I think\r
105 > Xapian::sortable_serialize converts time_ts to doubles anyway, so\r
106 > avoiding st_mtim is not really helping performance.)\r
107 \r
108 Agreed, it probably won't be the end of the world.. I will have to\r
109 handle conflicts anyway. With an inclusion of ctime my 'changed'-tag\r
110 patches are unnecessary.\r
111 \r
112 By the way, muchsync looks very promising!\r
113 \r
114 Cheers, gaute\r
115 \r