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 60B72429E25 for ; Wed, 22 Jun 2011 12:39:30 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.699 X-Spam-Level: X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-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 qPXof-A78BRa for ; Wed, 22 Jun 2011 12:39:28 -0700 (PDT) Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com [209.85.216.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 5375B431FD0 for ; Wed, 22 Jun 2011 12:39:28 -0700 (PDT) Received: by qwb7 with SMTP id 7so691002qwb.26 for ; Wed, 22 Jun 2011 12:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=LXT+TmYt2A7lHUJ4mjKwmCyYb/bDcup92phrSeyCfew=; b=M14HQCKGIgdiMvt4VgnCpXtnM2cJ5BkG5IOz+pnbt4Q9nUG5O7hhd+NcojwnA7jyVy KZ6vBXUuJndSiCTyyq3JUIIiOF9Tlo2r82dpGMNMMe8cpKHefuqRh2fIeBcO5EKFIeW7 Wc5xgyS5Aj8+HfrRVamDmAD9woCbwPQeIm1sU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=jdMSvh8MH8xVZWZyl5m6aF+63Ee2LOf2OLHj73blbT4M1OgIN15mobB+QLjwcUMCYH rZFFVPgX5Dd+w2s0Kk81FGnX+hR38Z8kA4Y/WAntVwFa75IP/5QYILkkRmuuQOoyYfgi ZlZqAmNAOOdAE1I/z3sk+UwwcSG3WCZKFSr5c= MIME-Version: 1.0 Received: by 10.229.18.67 with SMTP id v3mr910996qca.100.1308771567264; Wed, 22 Jun 2011 12:39:27 -0700 (PDT) Sender: amdragon@gmail.com Received: by 10.229.32.197 with HTTP; Wed, 22 Jun 2011 12:39:27 -0700 (PDT) In-Reply-To: <1307822683-848-1-git-send-email-amdragon@mit.edu> References: <87ei34rnc5.fsf@yoom.home.cworth.org> <1307822683-848-1-git-send-email-amdragon@mit.edu> Date: Wed, 22 Jun 2011 15:39:27 -0400 X-Google-Sender-Auth: z0voCGdMArVH8JV52YgMg7CdD1s Message-ID: Subject: Re: [PATCH v6 00/17] Fix 'notmuch new' atomicity issues From: Austin Clements To: Carl Worth Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Wed, 22 Jun 2011 19:39:30 -0000 Ping. On Sat, Jun 11, 2011 at 4:04 PM, Austin Clements wrote: > Here's the reworked patch series that uses atomic sections more > heavily rather than changing the removal API. =A0This is atomic-new-v6 > on http://awakening.csail.mit.edu/git/notmuch.git . > > (I was planning to make this series on Monday while stuck on a plane, > but an opportunity presented itself when I needed something better to > do than fix the sink. =A0As a result, if you can look over this before > Monday, I can use that time to address any further comments.) > > The beginning of the sequence---"test: Fix message when skipping > test_expect_equal* tests" through "new: Defer updating directory > mtimes until the end."---has not changed besides than the minor things > you pointed out earlier. =A0Here's a quick summary of the differences in > the rest of the sequence: > > lib: Add notmuch_database_{begin,end}_atomic. > =A0Rebased but otherwise identical. > > lib: Add support for nested atomic sections. > =A0New. > > lib: Indicate if there are more filenames after removal. > =A0Rebased but otherwise identical. > > lib: Remove message document directly after removing the last file > name. > =A0New. =A0Supersedes the patches that rewrote > =A0notmuch_database_remove_message and made sync delete messages. > > lib: Add an API to find a message by filename. > =A0Culled from "lib: Add API's to find by filename and ..." in the old > =A0series. =A0What I kept is identical. > > lib: Wrap notmuch_database_add_message in an atomic section. > =A0New. > > new: Cleanup. Put removed/renamed message count in add_files_state_t. > new: Cleanup. De-duplicate file name removal code. > =A0Both new, but closely related to previous remove_filename patch. > > new: Synchronize maildir flags eagerly. > =A0New, but very closely related to previous patch of the same name. > =A0This patch is simpler now because of the previous two cleanups. > > new: Wrap adding and removing messages in atomic sections. > =A0Rebased and added an atomic section around removal. > > lib: Improve notmuch_database_{add,remove}_message documentation. > =A0New. > > Ultimately, I still think the existing removal API is weird because it > forces you to do things like lookup a message by file name just in > case you need that message object after removal tells you that it > didn't actually remove the message. =A0But I don't know what to do about > it that isn't equally weird. > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch >