store: add lock to index_complete

It must be protected.
This commit is contained in:
Dirk-Jan C. Binnema 2022-05-12 23:23:47 +03:00
parent eb22ec450c
commit 201acfbbd3
1 changed files with 2 additions and 0 deletions

View File

@ -647,6 +647,8 @@ Store::commit()
void
Store::index_complete()
{
std::lock_guard lock{priv_->lock_};
g_debug("marking index complete");
priv_->writable_db().set_metadata(IndexedKey, tstamp_to_string(::time({})));
}