Eric Wong <[email protected]> writes: > "Eric W. Biederman" <[email protected]> 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...
Sounds good. With autocommit being on by default and repository locking happening I was not at all certain where transaction boundaries need to go (or if they are really needed). But by it's very nature num_highwater needs to be in the same transaction as whatever adds a new higher number into msgmap. > Everything else looks good, so far; thanks. Eric -- unsubscribe: [email protected] archive: https://public-inbox.org/meta/
