Xapian shard cleanup only requires read-only access to
over.sqlite3, so avoid opening it with read-write access since
create_tables will hit lock conflicts on "INSERT OR IGNORE"
statements.
sub shard_over_check {
my ($self, $over) = @_;
if ($self->{-ipc_req} && $over->{dbh}) {
- # can't send DB handles over IPC
- $over = ref($over)->new($over->{dbh}->sqlite_db_filename);
+ # can't send DB handles over IPC, and use read-only to avoid
+ # create_tables lock conflict:
+ $over = PublicInbox::Over->new($over->{dbh}->sqlite_db_filename)
}
$self->ipc_do('over_check', $over);
}