From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id IIJ0BwHfq2AEQgAAgWs5BA (envelope-from ) for ; Mon, 24 May 2021 19:14:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id OK0cAwHfq2D7HAAA1q6Kng (envelope-from ) for ; Mon, 24 May 2021 17:14:41 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (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 7D6AD21C9B for ; Mon, 24 May 2021 19:14:40 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 6385B2AA00; Mon, 24 May 2021 13:14: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 C6D70271C8 for ; Mon, 24 May 2021 13:14:32 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 6E8CB5FD25; Mon, 24 May 2021 13:14:31 -0400 (EDT) Received: (nullmailer pid 2868411 invoked by uid 1000); Mon, 24 May 2021 17:14:30 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: Re: Commit after some number of transactions In-Reply-To: <20210522012040.1412467-1-david@tethera.net> References: <20210522012040.1412467-1-david@tethera.net> Date: Mon, 24 May 2021 14:14:30 -0300 Message-ID: <87bl90oxzd.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: UHMWLPQ5ORA4OG7CUBHEY2WIRN6D3QUM X-Message-ID-Hash: UHMWLPQ5ORA4OG7CUBHEY2WIRN6D3QUM X-MailFrom: david@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=1621876480; 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=ZLrLllNTpNyZNR0aeWqk2Fw1CZ70Xr7u5d/k3fHaBss=; b=MoCrZWnvcplTR1/r+gORlLukk4eelal65IU0dKj0qhNvtdwRhn2GRQr7fSTaQbF9ksUSX3 z3etd/zNiBuoYksBCV1er2MM6rnnXtJYqimjWmeAV680B40f+VDCZ3QPkk1wLwPq+6FUYH 5hbzEmvd8uPf/u6tTYp9JdHf2EDXCKHSG1mJmumLEs98Y6TGa3Qkk5CPpnonNnnH5kY5qX gMnASRhByw0JnZqlUFecshwxX060665mHhpE4lI7/gwSGsn73KeiZPzDetIVvyulktUs31 shs998Mjq9hGex00/BpdtOiaXcaGk29xKRb6gJ+PuLaJFaRslnhb+Hx1jwiXqw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621876480; a=rsa-sha256; cv=none; b=Fy60uXACDSP0NxN5Vls5PUAUvx4vt4TlHntpuWyH8kfH0kgEjqh7p/9Npo4t+lq3MjtAhy Wl/LCBnUepAJSOGqUqNt8E5M11m9scP1LsRers36gCpXk2jXjJ6WbPCBqzEGnukIsA83Vf 8aLzr+J5tAFGg1N7XtW91dVWdxPNIyoCqpf6Fk6tBV35ioHSmj4tV3Y7kXLQXae667DZU7 DM2O/7y/qw9UR/BPpVTQk3+xCXlNjhFfp3k4KOB9b5IVQmiSU9oFyMn7SxsTC/6ojGCVwu vqXioVtFejyv26XBmBvzJVlDRYWVug27y6ujoqlNFUsYv2y/IvnxwsPQSUKWwQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.06 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 7D6AD21C9B X-Spam-Score: -2.06 X-Migadu-Scanner: scn0.migadu.com X-TUID: gWSoAV24gjUK David Bremner writes: > The main rational is explained in the commit message to > > [PATCH 4/5] lib: autocommit after some number of completed > > I'm not super-happy with the documentation in [5/5], as it explains > things in terms of database concepts the user shouldn't really need to > understand. > > [PATCH 5/5] doc: document database.autocommit variable > > The default value of 8000 was chose not to cause any noticable > slowdown when indexing the "large" corpus of about 200k messages. The > test machine is a recent Xeon with fast spinning rust drives; the > whole index takes about 8.5 minutes on this machine. I'd be curious if > other people notice a performance impact. On the same machine the > threshold of 8000 means that less than 30 seconds worth of work would > be discarded. An alternate approach would be to expose Xapian's commit() method as notmuch_database_commit(). That would not really conflict with this series, but arguably makes it unnecessary, if the clients (e.g. the notmuch CLI) add appropriate calls to notmuch_database_commit. I'm not 100% sure, but I think I may want to add notmuch_database_commit in any case, for some other cases where automatic committing doesn't work so well.