lib: fix batch-size after db creation

Ensure we use the user-specified batch-size immediately after db creation.
This commit is contained in:
Dirk-Jan C. Binnema
2024-05-26 11:04:27 +03:00
parent 7c22e95b5e
commit 1e9f772e0a
3 changed files with 21 additions and 4 deletions

View File

@ -75,8 +75,11 @@ struct Store::Private {
config_{make_config(xapian_db_, root_maildir, conf)},
contacts_cache_{config_},
root_maildir_{remove_slash(config_.get<Config::Id::RootMaildir>())},
message_opts_{make_message_options(config_)}
{}
message_opts_{make_message_options(config_)} {
// so tell xapian-db to update its internal cacheed values from
// config. In practice: batch-size.
xapian_db_.reinit();
}
~Private() try {
mu_debug("closing store @ {}", xapian_db_.path());