From e351f2ea6a67907cdf2d08b4ff627918a030df2b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 26 Aug 2025 19:50:39 +0000 Subject: [PATCH] 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'. --- lib/PublicInbox/V2Writable.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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}; -- 2.47.3