Skip to content

Commit

Permalink
WIP849
Browse files Browse the repository at this point in the history
  • Loading branch information
ban-nobuhiro committed Aug 9, 2024
1 parent dcf7743 commit 7292477
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/concurrency_control/interface/long_tx/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ extern Status version_traverse_and_read(session* const ti,
if (read_epoch > ti->get_read_version_max_epoch()) {
set_read_version_max_epoch_if_need(ti, read_epoch);
}
return Status::OK;
return ver->get_tid().get_absent() ? Status::WARN_NOT_FOUND : Status::OK;
}

static void create_read_set_for_read_info(session* const ti,
Expand Down
2 changes: 2 additions & 0 deletions src/concurrency_control/interface/long_tx/termination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ static inline void expose_local_write(
rec_ptr->get_tidw_ref().unlock();
}

/*
tid_word tid{loadAcquire(rec_ptr->get_tidw_ref().get_obj())};
auto check_cd = [&tid]() {
return (tid.get_latest() &&
Expand All @@ -141,6 +142,7 @@ static inline void expose_local_write(
}
rec_ptr->get_tidw_ref().unlock();
}
*/
[[fallthrough]]; // upsert is update
}
case OP_TYPE::DELETE: {
Expand Down
3 changes: 3 additions & 0 deletions src/concurrency_control/interface/scan/open_scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Status check_not_found(
ver = ver->get_next();
if (ver == nullptr) { break; }
if (ver->get_tid().get_epoch() < ti->get_valid_epoch()) {
if (ver->get_tid().get_absent()) { break; }
return Status::OK;
}
}
Expand Down Expand Up @@ -132,6 +133,7 @@ Status check_not_found(
ver = ver->get_next();
if (ver == nullptr) { break; }
if (ver->get_tid().get_epoch() < ti->get_valid_epoch()) {
if (ver->get_tid().get_absent()) { break; }
return Status::OK;
}
}
Expand All @@ -156,6 +158,7 @@ Status check_not_found(
if (ver == nullptr) { break; }
if (ver->get_tid().get_epoch() <
ti->get_valid_epoch()) {
if (ver->get_tid().get_absent()) { break; }
return Status::OK;
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/concurrency_control/interface/short_tx/termination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ Status write_phase(session* ti, epoch::epoch_t ce) {
}
}

/*
tid_word old_tid{wso_ptr->get_rec_ptr()->get_tidw_ref()};
if (old_tid.get_latest() && old_tid.get_absent()) {
// set value
Expand All @@ -493,6 +494,7 @@ Status write_phase(session* ti, epoch::epoch_t ce) {
wso_ptr->get_rec_ptr()->set_tid(update_tid);
break;
}
*/
[[fallthrough]];
// upsert is update
}
Expand Down

0 comments on commit 7292477

Please sign in to comment.