From: Eric Wong Date: Tue, 26 Aug 2025 19:50:39 +0000 (+0000) Subject: v2writable: checkpoint: clarify $dbh is for msgmap X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e351f2ea6a67907cdf2d08b4ff627918a030df2b;p=thirdparty%2Fpublic-inbox.git v2writable: checkpoint: clarify $dbh is for msgmap We overload the checkpoint sub for -extindex, however only v2 has msgmap.sqlite3 so we'll avoid confusing ourselves with with a generic `$dbh' name in favor of `$mm_dbh'. --- diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 62895af2b..7241cfc1e 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -518,7 +518,7 @@ sub checkpoint ($;$) { my $shards = $self->{idx_shards}; if ($shards) { # SQLite msgmap is second in importance (not in eidx) - my $dbh = $self->{mm} ? $self->{mm}->mm_commit : undef; + my $mm_dbh = $self->{mm} ? $self->{mm}->mm_commit : undef; # SQLite overview is third $self->{oidx}->commit_lazy; @@ -552,11 +552,11 @@ shard[$i] bad echo:$echo != $i waiting for txn commit # last_commit is special, don't commit these until # Xapian shards are done: - $dbh->begin_work if $dbh; + $mm_dbh->begin_work if $mm_dbh; set_last_commits($self); - if ($dbh) { - $dbh->commit; - $dbh->begin_work; + if ($mm_dbh) { + $mm_dbh->commit; + $mm_dbh->begin_work; } } delete $self->{next_checkpoint};