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 EC3E8431FC2 for ; Mon, 19 Nov 2012 05:52:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.098 X-Spam-Level: X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 S8i58C1Vrzey for ; Mon, 19 Nov 2012 05:52:08 -0800 (PST) Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 53FCF431FBC for ; Mon, 19 Nov 2012 05:52:08 -0800 (PST) Received: from smtp.qmul.ac.uk ([138.37.6.40]) by mail2.qmul.ac.uk with esmtp (Exim 4.71) (envelope-from ) id 1TaRlb-0002cF-Ne; Mon, 19 Nov 2012 13:52:05 +0000 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost) by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1TaRlb-0007K7-Bs; Mon, 19 Nov 2012 13:52:03 +0000 From: Mark Walters To: Peter Wang Subject: Re: [PATCH 01/18] cli: add stub for insert command In-Reply-To: <20121119233435.GD2063@hili.localdomain> References: <1343223767-9812-1-git-send-email-novalazy@gmail.com> <87fw46q0f7.fsf@qmul.ac.uk> <20121119233435.GD2063@hili.localdomain> User-Agent: Notmuch/0.14+81~g9730584 (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu) Date: Mon, 19 Nov 2012 13:52:02 +0000 Message-ID: <871ufppunx.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Sender-Host-Address: 93.97.24.31 X-QM-SPAM-Info: Sender has good ham record. :) X-QM-Body-MD5: 86498e1e3878552255a7faf36238ee97 (of first 20000 bytes) X-SpamAssassin-Score: -1.8 X-SpamAssassin-SpamBar: - X-SpamAssassin-Report: The QM spam filters have analysed this message to determine if it is spam. We require at least 5.0 points to mark a message as spam. This message scored -1.8 points. Summary of the scoring: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [138.37.6.40 listed in list.dnswl.org] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (markwalters1009[at]gmail.com) * 0.5 AWL AWL: From: address is in the auto white-list X-QM-Scan-Virus: ClamAV says the message is clean 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: Mon, 19 Nov 2012 13:52:09 -0000 Hi On Mon, 19 Nov 2012, Peter Wang wrote: > On Sun, 18 Nov 2012 17:35:23 +0000, Mark Walters wrote: >> >> Hi >> >> I have now been through essentially the whole series (except the tests) >> and broadly like it. Just to summarise my concerns from the individual >> replies here: > > Thanks for the review. > >> >> What should insert do when interrupted and is it safe? I am not >> knowledgeable enough to be confident about that. > > Do you mean cleaning up stray files? Otherwise I think we just return > an error code, and then it's the caller's responsibility. It's more that I am concerned that we don't corrupt the database (or get into some inconsistent state). I have some recollection that there were some changes to notmuch new to try and make it interrupt safe but I don't know what they were or whether they apply here. Best wishes Mark > >> >> I think some of the talloc allocations need their return values >> checked. I am more worried about this here then in most of the rest of >> notmuch as we are writing to the database (and even to the mailstore >> itself). > > Will do. > > Peter