Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix epoch_id_record_finished_ handling in datastore::update_min_epoch… #75

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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