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 9865C429E25 for ; Wed, 3 Aug 2011 15:26:57 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 qAniA9dB4xMO for ; Wed, 3 Aug 2011 15:26:57 -0700 (PDT) Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU [18.9.25.15]) by olra.theworths.org (Postfix) with ESMTP id DF8EC431FB6 for ; Wed, 3 Aug 2011 15:26:56 -0700 (PDT) X-AuditID: 1209190f-b7b44ae000000a24-a5-4e39c9545a0e Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP id B2.7D.02596.459C93E4; Wed, 3 Aug 2011 18:19:00 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id p73MLU1P007641; Wed, 3 Aug 2011 18:21:31 -0400 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id p73MLSIV025668 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Wed, 3 Aug 2011 18:21:29 -0400 (EDT) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.72) (envelope-from ) id 1QojoR-0003GY-C5; Wed, 03 Aug 2011 18:21:15 -0400 Date: Wed, 3 Aug 2011 18:21:15 -0400 From: Austin Clements To: Jameson Graef Rollins Subject: Re: [PROTO] possible solution for "Race condition for '*' command" Message-ID: <20110803222115.GQ17291@mit.edu> References: <20110703171743.GL15901@mit.edu> <1309762318-4530-1-git-send-email-pieter@praet.org> <87sjqldgr7.fsf@praet.org> <87iprg7dm0.fsf@praet.org> <20110705214234.GA15360@mit.edu> <87oc06i34f.fsf@servo.factory.finestructure.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87oc06i34f.fsf@servo.factory.finestructure.net> User-Agent: Mutt/1.5.20 (2009-06-14) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIKsWRmVeSWpSXmKPExsUixCmqrRty0tLP4OA+CYubP+ewWezZ52Vx /eZMZov7y9+zWvx+fYPZgdVj9+YHLB53T3N5PFt1i9mjY99lVo91O/+wB7BGcdmkpOZklqUW 6dslcGXM23iSqaCbv+L9lsMsDYx/ubsYOTkkBEwktq+8yQZhi0lcuLceyObiEBLYxygxe34/ O4SznlFixoxDzBDOCSaJSTNesIK0CAksYZRoO2wCYrMIqEj8Pn6OHcRmE9CQ2LZ/OSOILSJg JtHz5Q8jSDOzwCRGiS0zpoIVCQt4S3x6OpcFxOYV0JGY1n0QavcXJon77/oYIRKCEidnPgEr YhbQkrjx7yVTFyMHkC0tsfwfB0iYU8BW4tKXd8wgtijQEdf2t7NNYBSahaR7FpLuWQjdCxiZ VzHKpuRW6eYmZuYUpybrFicn5uWlFuma6OVmluilppRuYgTHhCT/DsZvB5UOMQpwMCrx8Eom WPoJsSaWFVfmHmKU5GBSEuVNPg4U4kvKT6nMSCzOiC8qzUktPsQowcGsJMI7rxIox5uSWFmV WpQPk5LmYFES5y33/u8rJJCeWJKanZpakFoEk5Xh4FCS4L10AqhRsCg1PbUiLTOnBCHNxMEJ MpwHaPgZkBre4oLE3OLMdIj8KUZFKXFeBWDSERIASWSU5sH1wlLWK0ZxoFeEeV1AqniA6Q6u +xXQYCagwf/fW4AMLklESEk1MPI5p5reP/cvLjtSxmznlEOMLJs2Wx5N+Sa+TWia3J1DsraO c3OeJXhmNhzcoBD4z/TTtTve71dxHIk+f9lC6cin/2mH4jNjsk55xG9yP1m3YOczu4BA/a1c vk7XbhQXbWgr1zavfJtsmt1s+bp/wQvWlNMJrztfTuRlq9JgmGysvZ57cVDJFCWW4oxEQy3m ouJEAPTqkQY0AwAA Cc: Olly Betts , Notmuch Mail 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, 03 Aug 2011 22:26:57 -0000 Quoth Jameson Graef Rollins on Aug 03 at 2:42 pm: > On Wed, 3 Aug 2011 16:47:32 -0400, Austin Clements wrote: > > The downside to using document ID's is that we need API's to expose > > them. My prototype exposes these as opaque "object ID"s, which acts a > > lot like message IDs, but has no intrinsic meaning outside of the > > library. This needs two library functions: one to retrieve a > > message's object ID and another to retrieve a message by object ID. > > This sounds totally reasonable to me. Maybe we could use something like > "oid:" from the command line? That would be difficult with Xapian's query parser (though, probably fairly easy with the custom query parser). This is one rough edge in my prototype. Currently, I have notmuch tag take an --objids flag that makes it interpret the query as a whitespace-separated list of object ID's instead of as a query string. In a way, this makes sense, but it would be annoying to do this to all of the commands. We could special-case the query syntax and accept *either* a regular query or an object ID query, but not a mixture of terms. That would be pleasantly forward-compatible and would address the special handling in notmuch tag. It would also give an easier path to fixing the race condition, since we could fix it right away with message ID queries and then move to object ID queries. (Also, this could eliminate the lookup-by-object-ID API function, though maybe we want that anyway.) > > 3x-4x isn't enough to make me jump on this added complexity, but it's > > enough to make me consider it. Carl, I'd love to hear your thoughts. > > Imho 3x-4x is actually a pretty huge improvement. Is it really that > much of an added complexity to add those two functions? That actually > seems like a relatively simple patch to me. The patch itself is only a few lines, but it adds a new concept.