From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OIjLFLLmqGD98QAAgWs5BA (envelope-from ) for ; Sat, 22 May 2021 13:10:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WFJ8ELLmqGBoegAAbx9fmQ (envelope-from ) for ; Sat, 22 May 2021 11:10:42 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0775E21217 for ; Sat, 22 May 2021 13:10:42 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id AC46F2A9B9; Sat, 22 May 2021 07:10:36 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id B17942A9AF for ; Sat, 22 May 2021 07:10:34 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 90BC35FD25; Sat, 22 May 2021 07:10:34 -0400 (EDT) Received: (nullmailer pid 1481176 invoked by uid 1000); Sat, 22 May 2021 11:10:33 -0000 From: David Bremner To: David Bremner , notmuch@notmuchmail.org Subject: [PATCH] lib: update transaction documentation Date: Sat, 22 May 2021 08:10:26 -0300 Message-Id: <20210522111026.1481127-1-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210522012040.1412467-6-david@tethera.net> References: <20210522012040.1412467-6-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: CF7DBSIMF5RZQRUUREZ4HDP35YI4JBFW X-Message-ID-Hash: CF7DBSIMF5RZQRUUREZ4HDP35YI4JBFW X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621681842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=CMeeGjrL3BYUuQ1uLY0ISkKHR28Nu2DcFzYia9WJc4o=; b=ru3CzvYkO9Fqek1vx52ezjbParli9gU96mqjF/PTTR+KaJPWWRlGrDMp2WuoqYY/BBchVd ogaay4EajFY41h6x+BjeViHtmUHYCpkTWWObAx+xjKrdNDOvob+RlUXEZpyNAYHStRdYEz ayX+zzAQ+VJUET7ICYFfIlS7tw6t3dNh6RGuBRm83KziAi+qqacwj0axMbh6NPJfmtkAD0 5TKdWgfKeHpnrwu/4ejJFxbwbTmNmY4vH/dB1phBQCFTt4Rv7pzwXCOOUE/sIazhS6xfFt MLNhjjmjrqtBgpOXQNi6SKY2hkkf0SokKLfDs5OsBa0iqNpXUxJht9LWxPRtyg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621681842; a=rsa-sha256; cv=none; b=GiNXpFlKtbK8414KvjglsgsYoIzieF5EfhBTv6jGi9ZItRtXPoyiFBigiVVdgC0O/EDTJJ UgJVw2skcjLkoCJjrnYCUsLFWyTRCSKTZiL1s2qkHXASDgoeGXcw43K8qaXSJIXGyhypun DFB6f+2rmANpgnzIguvlOrN7zpdtTBxuRnUHDl+9yv3PvWznGtJc6yM5qQZcIMosXWm8dX tOcIFaJGNX6ZQegoAHkqeWIz2JV4MKUU3pAtWNyGGhhSWwg7jxM8kIoDmU78nGOfiJOOEp CNYMx9/9TRTbsUpvIaJhUbNuZRhpm6jci4kgY0Kq1mw7xK3nVSylVqrnNm3t3Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.08 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 0775E21217 X-Spam-Score: -1.08 X-Migadu-Scanner: scn0.migadu.com X-TUID: k2Alhpa973dm Partly this is to recognize the semantics we inherit from Xapian, partly to mention the new autocommit feature. --- lib/notmuch.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/notmuch.h b/lib/notmuch.h index 5c3be342..3b28bea3 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -529,11 +529,11 @@ notmuch_database_status_string (const notmuch_database_t *notmuch); * have no effect. * * For writable databases, notmuch_database_close commits all changes - * to disk before closing the database. If the caller is currently in - * an atomic section (there was a notmuch_database_begin_atomic - * without a matching notmuch_database_end_atomic), this will discard - * changes made in that atomic section (but still commit changes made - * prior to entering the atomic section). + * to disk before closing the database, unless the caller is currently + * in an atomic section (there was a notmuch_database_begin_atomic + * without a matching notmuch_database_end_atomic). In this case + * changes since the last commit are discarded. @see + * notmuch_database_end_atomic for more information. * * Return value: * @@ -670,7 +670,10 @@ notmuch_status_t notmuch_database_begin_atomic (notmuch_database_t *notmuch); /** - * Indicate the end of an atomic database operation. + * Indicate the end of an atomic database operation. If repeated + * (with matching notmuch_database_begin_atomic) "database.autocommit" + * times, commit the the transaction and all previous (non-cancelled) + * transactions to the database. * * Return value: * -- 2.30.2