The DBD::SQLite(3pm) sqlite_busy_timeout is 30s and we don't
currently have a way to override this. Thus 15s should be
adequate assuming we can keep SQLite commit times <10s.
Currently, the worst case commit times can exceed even 30s for
Xapian, but that doesn't affect over.sqlite3 which commits
fairly quickly.
$pr->("indexing $ekey\n") if $pr;
$self->idx_init($opt);
sync_inbox $self, $ibx;
- $self->{-commit_timer} //= add_timer($opt->{'commit-interval'} // 10,
- \&_watch_commit, $self);
+ $self->{-commit_timer} //= add_timer($opt->{'commit-interval'} //
+ $PublicInbox::SearchIdx::CHECKPOINT_INTVL,
+ \&_watch_commit, $self);
}
sub eidx_reload { # -extindex --watch SIGHUP handler
our ($DB_CREATE_OR_OPEN, $DB_OPEN);
our $DB_NO_SYNC = 0;
our $DB_DANGEROUS = 0;
-our $CHECKPOINT_INTVL = 5; # seconds
+our $CHECKPOINT_INTVL = 15; # seconds
our $DEFRAG_NR = 100000; # document count
our $BATCH_BYTES = $ENV{XAPIAN_FLUSH_THRESHOLD} ? 0x7fffffff :
# assume a typical 64-bit system has 8x more RAM than a