Skip to content

Commit

Permalink
ensure that limestone datastore object is released during shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
ban-nobuhiro committed Feb 25, 2025
1 parent eea3074 commit f78451c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/concurrency_control/interface/shut_down.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ void fin_body([[maybe_unused]] bool force_shut_down_logging) try {
<< "shutdown:start_shutdown_datastore";
datastore::get_datastore()
->shutdown(); // this should after epoch::fin();
datastore::release_datastore();
VLOG(log_debug_timing_event) << log_location_prefix_timing_event
<< "shutdown:end_shutdown_datastore";
// cleanup about limestone
Expand Down
4 changes: 4 additions & 0 deletions src/datastore/limestone/include/datastore.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ start_datastore(limestone::api::configuration const& conf) {
datastore_ = std::make_unique<limestone::api::datastore>(conf);
}

[[maybe_unused]] static void release_datastore() {
datastore_ = nullptr;
}

/**
* @brief It executes create_channel and pass it to shirakami's executor.
*/
Expand Down

0 comments on commit f78451c

Please sign in to comment.