From: Ethan Glasser-Camp Date: Sat, 20 Oct 2012 15:49:04 +0000 (+2000) Subject: Re: [PATCH v2 0/2] Add flush/reopen methods to notmuch_database_t X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=3fbc8fe04b2745dc72f7c67519d23125d9bac6f2;p=notmuch-archives.git Re: [PATCH v2 0/2] Add flush/reopen methods to notmuch_database_t --- diff --git a/0f/d706ca94b909b1656d13c501820f17ad71ad86 b/0f/d706ca94b909b1656d13c501820f17ad71ad86 new file mode 100644 index 000000000..f4a88afc8 --- /dev/null +++ b/0f/d706ca94b909b1656d13c501820f17ad71ad86 @@ -0,0 +1,95 @@ +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 16DD6431FAF + for ; Sat, 20 Oct 2012 08:49:10 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 Hp2jRqMtQuQP for ; + Sat, 20 Oct 2012 08:49:09 -0700 (PDT) +Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com + [209.85.212.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 8160C431FAE + for ; Sat, 20 Oct 2012 08:49:09 -0700 (PDT) +Received: by mail-vb0-f53.google.com with SMTP id fc21so1630032vbb.26 + for ; Sat, 20 Oct 2012 08:49:07 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type; + bh=HVdoChQffd+po/3Q/yJr4BjVUzLpd3dHtL4jKVB88GU=; + b=vz5pMIiXD0SHDWcfYK8cbgGbNIuF7xJ0FygQTkmR+6aUdhxEIPQKCILJ86twmY0UzA + fuK3D8G7ZeeEQEvrteBkaNFzF/sKj3V3Ie74AF5ivFOkGI1Wn8bNfdN22DjP19pl7tG1 + hXxEg/M0t+XI2p8Cv0QOVdwGESbAhTYeFpyn3ADXR3zUlY7FfxowquC+xIIuydmwXNph + BA6wja7PL37hcsIkTKgIjY59BApllH0KmQnWc3kAz6HSR3/sLZeFYVN0ktqZb/z9gQqf + YjtbH3iHUWQgueq2NC4MSx05/+QK3jXv7T5ecuhjxdDhhOnVgvxN4MlNYt2ozwd1TlsY + 9keQ== +Received: by 10.220.221.203 with SMTP id id11mr6211516vcb.42.1350748147266; + Sat, 20 Oct 2012 08:49:07 -0700 (PDT) +Received: from smtp.gmail.com (p70-80.acedsl.com. [66.114.70.80]) + by mx.google.com with ESMTPS id g5sm4347339vez.6.2012.10.20.08.49.05 + (version=TLSv1/SSLv3 cipher=OTHER); + Sat, 20 Oct 2012 08:49:06 -0700 (PDT) +From: Ethan Glasser-Camp +To: Jani Nikula , Adrien Bustany , + notmuch@notmuchmail.org +Subject: Re: [PATCH v2 0/2] Add flush/reopen methods to notmuch_database_t +In-Reply-To: <87vce7yllt.fsf@nikula.org> +References: <1342723401-26103-1-git-send-email-adrien@bustany.org> + <1350510742-13447-1-git-send-email-adrien@bustany.org> + <87vce7yllt.fsf@nikula.org> +User-Agent: Notmuch/0.14+45~g6ea9330 (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-pc-linux-gnu) +Date: Sat, 20 Oct 2012 11:49:04 -0400 +Message-ID: <87y5j15ekv.fsf@betacantrips.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +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: Sat, 20 Oct 2012 15:49:10 -0000 + +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