diff options
author | Eric Wong <e@80x24.org> | 2021-07-06 12:42:03 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-07-06 13:36:55 +0000 |
commit | 9a0d173ead1b44d6a8e9eac624852cd007ef9ac5 (patch) | |
tree | 880ff4c12149f06587475f4594be03b370f1aa47 | |
parent | 8ef622d408d2e4d98ad3aada8466f539c9ac61ba (diff) | |
download | public-inbox-9a0d173ead1b44d6a8e9eac624852cd007ef9ac5.tar.gz |
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.
-rw-r--r-- | lib/PublicInbox/SearchIdxShard.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/SearchIdxShard.pm b/lib/PublicInbox/SearchIdxShard.pm index 1598faeb..8635f585 100644 --- a/lib/PublicInbox/SearchIdxShard.pm +++ b/lib/PublicInbox/SearchIdxShard.pm @@ -78,8 +78,9 @@ sub shard_close { 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); } |