Skip to content

Commit

Permalink
fix epoch_id_record_finished_ handling in datastore::update_min_epoch…
Browse files Browse the repository at this point in the history
…_id()
  • Loading branch information
t-horikawa committed Dec 19, 2024
1 parent d9a83c9 commit 467907c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/limestone/datastore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::mutex> lock(mtx_epoch_file_);
write_epoch_to_file(static_cast<epoch_id_type>(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;
}
}
Expand Down

0 comments on commit 467907c

Please sign in to comment.