Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ban-nobuhiro committed Feb 12, 2025
1 parent e4e005a commit be3c0d4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/concurrency_control/interface/scan/open_scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,12 @@ constexpr Status check_empty_scan_range(const std::string_view l_key, const scan
// if left end is inf, not empty in most cases
if (r_end == scan_endpoint::EXCLUSIVE && r_key == "") {
return Status::WARN_NOT_FOUND; // exception
} else {
return Status::OK;
}
return Status::OK;
}
int cmp_key = l_key.compare(r_key);
if (cmp_key < 0) {
return Status::OK; // if left is less, not empty
} else if (cmp_key > 0) {
return Status::WARN_NOT_FOUND; // if left is greater, invalid range
}
if (cmp_key < 0) { return Status::OK; } // if left is less, not empty
if (cmp_key > 0) { return Status::WARN_NOT_FOUND; } // if left is greater, invalid range
// l_key == r_key
if (l_end == scan_endpoint::INCLUSIVE && r_end == scan_endpoint::INCLUSIVE) {
return Status::OK; // single point, not empty
Expand Down

0 comments on commit be3c0d4

Please sign in to comment.