]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchIdxShard.pm
www: avoid incorrect instructions for extindex
[public-inbox.git] / lib / PublicInbox / SearchIdxShard.pm
index 0051df9305286f39ea5329bfb4f64bb4bbde83d8..8635f5858a8ac37b14c6707b412ce69a6d828d08 100644 (file)
@@ -54,7 +54,7 @@ sub ipc_atfork_child { # called automatically before ipc_worker_loop
 sub index_eml {
        my ($self, $eml, $smsg, $eidx_key) = @_;
        $smsg->{eidx_key} = $eidx_key if defined $eidx_key;
-       $self->ipc_do('add_message', $eml, $smsg);
+       $self->ipc_do('add_xapian', $eml, $smsg);
 }
 
 # wait for return to determine when ipc_do('commit_txn_lazy') is done
@@ -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);
 }