1 Return-Path: <ethan.glasser.camp@gmail.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 68C41431FBD
\r
6 for <notmuch@notmuchmail.org>; Wed, 17 Oct 2012 08:54:02 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id 4lbYCv4FilER for <notmuch@notmuchmail.org>;
\r
17 Wed, 17 Oct 2012 08:54:01 -0700 (PDT)
\r
18 Received: from mail-qa0-f46.google.com (mail-qa0-f46.google.com
\r
19 [209.85.216.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 0575B431FB6
\r
22 for <notmuch@notmuchmail.org>; Wed, 17 Oct 2012 08:54:00 -0700 (PDT)
\r
23 Received: by mail-qa0-f46.google.com with SMTP id c26so665400qad.5
\r
24 for <notmuch@notmuchmail.org>; Wed, 17 Oct 2012 08:54:00 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=from:to:subject:in-reply-to:references:user-agent:date:message-id
\r
27 :mime-version:content-type;
\r
28 bh=scqBdlyVz0Od3UtsvmiT1ArikqUwPIbwNnTrluXluaA=;
\r
29 b=m38+l0unG9qD+nWRqwX6yJgjpTUnrnIGBWigFmkKlTv9CiAHFOWBUUkGh++B2CKSUp
\r
30 sfyvG+BvgUNl6cwFUtBEgf1FToA5tznCFgXYKKroxX8RYo/zT1emuzhIqso5Ngnw4akM
\r
31 sofFbgQj9qSTa6UWifkRa/jLU2ZltCYjriD496yjPJ2wW9ZMyoqxDjO24U2xdPCSn4wl
\r
32 Ikf2swYMcXjHSwnAixNgKi7BiR+hgQOHv4LWCzxYU6eqao1+d2QukW8v8GVQCfK6vlrT
\r
33 zbFIT75cHcIMDs13YJCyldF//jyzHREDbxoss58do+iz7L6ZSeTVA/FuG8MkOjgCzaXb
\r
35 Received: by 10.49.2.200 with SMTP id 8mr44481837qew.20.1350489240142;
\r
36 Wed, 17 Oct 2012 08:54:00 -0700 (PDT)
\r
37 Received: from smtp.gmail.com (p70-80.acedsl.com. [66.114.70.80])
\r
38 by mx.google.com with ESMTPS id j9sm9225164qac.15.2012.10.17.08.53.56
\r
39 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Wed, 17 Oct 2012 08:53:57 -0700 (PDT)
\r
41 From: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>
\r
42 To: Adrien Bustany <adrien@bustany.org>, notmuch@notmuchmail.org
\r
43 Subject: Re: [PATCH 1/2] Add notmuch_database_flush method
\r
44 In-Reply-To: <1342723401-26103-2-git-send-email-adrien@bustany.org>
\r
45 References: <1342723401-26103-1-git-send-email-adrien@bustany.org>
\r
46 <1342723401-26103-2-git-send-email-adrien@bustany.org>
\r
47 User-Agent: Notmuch/0.14+45~g6ea9330 (http://notmuchmail.org) Emacs/23.3.1
\r
48 (x86_64-pc-linux-gnu)
\r
49 Date: Wed, 17 Oct 2012 11:53:55 -0400
\r
50 Message-ID: <87d30h857w.fsf@betacantrips.com>
\r
52 Content-Type: text/plain; charset=us-ascii
\r
53 X-BeenThere: notmuch@notmuchmail.org
\r
54 X-Mailman-Version: 2.1.13
\r
56 List-Id: "Use and development of the notmuch mail system."
\r
57 <notmuch.notmuchmail.org>
\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
61 List-Post: <mailto:notmuch@notmuchmail.org>
\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
65 X-List-Received-Date: Wed, 17 Oct 2012 15:54:02 -0000
\r
67 Adrien Bustany <adrien@bustany.org> writes:
\r
69 > This method explicitly flushes the pending modifications to disk. It is
\r
70 > useful if your program has various threads, each with a read only DB and
\r
71 > one writer thread with a read/write DB. In that case, you most likely
\r
72 > want the writer to sync the changes to disk so that the readers can see
\r
73 > them, without having to close and reopen the database completely.
\r
75 These patches are pretty straightforward. But to conform to notmuch style..
\r
78 > +notmuch_database_flush(notmuch_database_t *notmuch)
\r
80 > + notmuch_status_t status = NOTMUCH_STATUS_SUCCESS;
\r
82 Indent is 4 spaces. (You have tabs here, which are 8 spaces, according
\r
86 > + if (notmuch->xapian_db != NULL &&
\r
88 if should be more indented than try. (So when you pull try back to 4
\r
89 spaces, leave if at 8 spaces.)
\r
91 > + notmuch->mode == NOTMUCH_DATABASE_MODE_READ_WRITE)
\r
92 > + (static_cast <Xapian::WritableDatabase *> (notmuch->xapian_db))->flush ();
\r
94 This line is 90 characters, and will remain at 86 once you indent using
\r
95 the in-house style. I'm not sure if it's worth reformatting.
\r
96 notmuch_database_close calls flush() using exactly the same 86-character
\r
97 line. I'd say "don't make it worse", but personally I think breaking
\r
98 this line might be worse.
\r