From 201acfbbd38d030826698f39e49d50878e025590 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Thu, 12 May 2022 23:23:47 +0300 Subject: [PATCH] store: add lock to index_complete It must be protected. --- lib/mu-store.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/mu-store.cc b/lib/mu-store.cc index 550d3ce2..56861d39 100644 --- a/lib/mu-store.cc +++ b/lib/mu-store.cc @@ -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({}))); }