}
my $shards = $self->{idx_shards};
if ($shards) {
- my $dbh = $self->{mm}->{dbh};
+ my $mm = $self->{mm};
+ my $dbh = $mm->{dbh} if $mm;
# SQLite msgmap data is second in importance
- $dbh->commit;
+ $dbh->commit if $dbh;
# SQLite overview is third
$self->{oidx}->commit_lazy;
# last_commit is special, don't commit these until
# Xapian shards are done:
- $dbh->begin_work;
+ $dbh->begin_work if $dbh;
set_last_commits($self);
- $dbh->commit;
-
- $dbh->begin_work;
+ if ($dbh) {
+ $dbh->commit;
+ $dbh->begin_work;
+ }
}
$self->{total_bytes} += $self->{transact_bytes};
$self->{transact_bytes} = 0;
# because we want NNTP article number gaps from unindexed
# messages to show up in mirrors, too.
$sync->{D} //= $sync->{reindex} ? {} : undef; # OID_BIN => NR
- my $stk = log2stack($sync, $git, $range, $sync->{ibx});
+ my $stk = log2stack($sync, $git, $range);
my $nr = $stk ? $stk->num_records : 0;
$pr->("$nr\n") if $pr;
$sync->{stacks}->[$i] = $stk if $stk;