Skip to content

Commit

Permalink
eliminate session::operationg++, --
Browse files Browse the repository at this point in the history
  • Loading branch information
ban-nobuhiro committed Feb 26, 2025
1 parent f78451c commit 21d8f89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/concurrency_control/epoch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@
namespace shirakami::epoch {

inline void check_epoch_load_and_update_idle_living_tx() {
#if 0
auto ce{epoch::get_global_epoch()};
for (auto&& itr : session_table::get_session_table()) {
if (itr.get_operating().load(std::memory_order_acquire) == 0) {
// this session is not processing now.
if (itr.get_step_epoch() < ce) { itr.set_step_epoch(ce); }
}
}
#endif
}

inline void refresh_short_expose_ongoing_status(const epoch_t ce) {
Expand Down
4 changes: 4 additions & 0 deletions src/concurrency_control/include/session.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,13 @@ class alignas(CACHE_LINE_SIZE) session {
void process_before_start_step() {
// make sure that step_epoch is set when operating becomes 0 to 1
set_step_epoch(epoch::get_global_epoch());
#if 0
get_operating()++;
#endif
}

void process_before_finish_step() {
#if 0
auto expected = get_operating().load(std::memory_order_acquire);
for (;;) {
if (expected == 0) {
Expand All @@ -428,6 +431,7 @@ class alignas(CACHE_LINE_SIZE) session {
break;
}
}
#endif
}

void clear_ltx_storage_read_set() {
Expand Down

0 comments on commit 21d8f89

Please sign in to comment.