From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id DFEB41F597; Thu, 2 Aug 2018 03:00:22 +0000 (UTC) Date: Thu, 2 Aug 2018 03:00:22 +0000 From: Eric Wong To: "Eric W. Biederman" Cc: meta@public-inbox.org Subject: Re: [PATCH 08/13] Msgmap.pm: Track the largest value of num ever assigned Message-ID: <20180802030022.ly2tvbobs7tkfmn3@whir> References: <878t5qkpis.fsf@xmission.com> <20180801164344.7911-8-ebiederm@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180801164344.7911-8-ebiederm@xmission.com> List-Id: "Eric W. Biederman" wrote: > --- a/lib/PublicInbox/Msgmap.pm > +++ b/lib/PublicInbox/Msgmap.pm > @@ -51,6 +51,10 @@ sub new_file { > $dbh->begin_work; > $self->created_at(time) unless $self->created_at; > $dbh->commit; > + > + my (undef, $max) = $self->minmax(); > + $max ||= 0; > + $self->num_highwater($max); I think the calls to minmax and num_highwater should be in the transaction right above it. I can squash locally if that's the only thing... Everything else looks good, so far; thanks. While testing this, it looks like I introduced a bug to indexlevel=basic which broke incremental indexing when I made it possible to upgrade to (medium|full). Patch coming for that in a bit...