Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 29709431FCB for ; Thu, 25 Oct 2012 11:39:44 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xN+ffDjV+nIV for ; Thu, 25 Oct 2012 11:39:43 -0700 (PDT) Received: from mail.bustany.org (bustany.org [176.31.244.208]) by olra.theworths.org (Postfix) with ESMTP id 22537431FAE for ; Thu, 25 Oct 2012 11:39:43 -0700 (PDT) Received: from [192.168.1.147] (91-158-5-86.elisa-laajakaista.fi [91.158.5.86]) by mail.bustany.org (Postfix) with ESMTPSA id BACFC140230; Thu, 25 Oct 2012 20:43:35 +0200 (CEST) Message-ID: <50898769.2040202@bustany.org> Date: Thu, 25 Oct 2012 21:39:37 +0300 From: Adrien Bustany User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121009 Thunderbird/16.0 MIME-Version: 1.0 To: Ethan Glasser-Camp Subject: Re: [PATCH v2 0/2] Add flush/reopen methods to notmuch_database_t References: <1342723401-26103-1-git-send-email-adrien@bustany.org> <1350510742-13447-1-git-send-email-adrien@bustany.org> <87vce7yllt.fsf@nikula.org> <87y5j15ekv.fsf@betacantrips.com> In-Reply-To: <87y5j15ekv.fsf@betacantrips.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2012 18:39:44 -0000 Le 20/10/2012 18:49, Ethan Glasser-Camp a écrit : > Jani Nikula writes: > >> On Wed, 17 Oct 2012, Adrien Bustany wrote: >>> The code of the patches in unchanged, but the formatting issues are now >>> hopefully fixed. >> >> Hi Adrien, please check at what version flush and reopen have been >> introduced to xapian. If they are new-ish (I don't know, didn't have the >> time to check), please add appropriate #ifdefs. [1] lays the groundwork >> for this. We'll also need to decide what is the minimum xapian version >> required in general, i.e. features earlier than that don't need >> conditional compilation. > > Hi! The new versions of these patches are still pretty trivial and they > still look OK to me, but based on Jani's prompting I decided to look up > the methods. Seems that flush() is a very old (pre-1.1.0, 2009-04) name > for commit(), which is the preferred name these days. You should > probably therefore rename the function notmuch_database_commit, and have > it call the WritableDatabase::commit() method. > > reopen() is a very very old method, seems like it has been around since > 2004. > > So I think Adrien is safe from having to do version checks, but we > should probably use commit() instead of flush(). > > Ethan > Thanks for checking that! Sorry for the late answer, I had a hard time keeping on top of things lately...