Skip to content

Commit

Permalink
fix snapshot reading to handle absent records;
Browse files Browse the repository at this point in the history
  • Loading branch information
ban-nobuhiro committed Aug 9, 2024
1 parent e1a9fd6 commit 15f1b2c
Show file tree
Hide file tree
Showing 2 changed files with 4 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
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

0 comments on commit 15f1b2c

Please sign in to comment.