From 467907ca52a86a63ec3126046bd6741763ec3cab Mon Sep 17 00:00:00 2001 From: t-horikawa Date: Thu, 19 Dec 2024 11:57:45 +0900 Subject: [PATCH] fix epoch_id_record_finished_ handling in datastore::update_min_epoch_id() --- src/limestone/datastore.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/limestone/datastore.cpp b/src/limestone/datastore.cpp index e717435..0befbd4 100644 --- a/src/limestone/datastore.cpp +++ b/src/limestone/datastore.cpp @@ -274,9 +274,8 @@ void datastore::update_min_epoch_id(bool from_switch_epoch) { // NOLINT(readabi TRACE << "epoch_id_to_be_recorded_ updated to " << to_be_epoch; std::lock_guard lock(mtx_epoch_file_); write_epoch_to_file(static_cast(to_be_epoch)); - auto recorded_epoch = epoch_id_to_be_recorded_.load(); - epoch_id_record_finished_.store(recorded_epoch); - TRACE << "epoch_id_record_finished_ updated to " << recorded_epoch; + epoch_id_record_finished_.store(to_be_epoch); + TRACE << "epoch_id_record_finished_ updated to " << to_be_epoch; break; } }