From 7d86beb14c6480937beed907d4196a64e9216b52 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Wed, 7 Aug 2024 16:51:23 -0700 Subject: [PATCH] Revert 29c05187fb09c25aa2cb75936d07b89be918147e We're already doing this in checkRangeStartsWith --- ConflictSet.cpp | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 0d08a58..2dcc3bd 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -2795,38 +2795,13 @@ bool checkRangeRead(Node *n, std::span begin, } auto [child, v] = getChildAndMaxVersion(n, remaining[0]); if (child == nullptr) { - auto c = getChildGeq(n, remaining[0]); - if (c != nullptr) { - n = c; - goto downLeftSpine; - } else { - n = nextSibling(n); - if (n == nullptr) { - return true; - } - goto downLeftSpine; - } + break; } if (child->partialKeyLen > 0) { int cl = std::min(child->partialKeyLen, remaining.size() - 1); int i = longestCommonPrefix(child->partialKey(), remaining.data() + 1, cl); - if (i < cl) { - auto c = child->partialKey()[i] <=> remaining[1 + i]; - if (c > 0) { - n = child; - goto downLeftSpine; - } else { - n = nextSibling(child); - if (n == nullptr) { - return true; - } - goto downLeftSpine; - } - } - // If the partial key is longer than the common prefix (remaining), we - // still need to keep searching if (i != child->partialKeyLen) { break; } @@ -2842,12 +2817,6 @@ bool checkRangeRead(Node *n, std::span begin, } assert(getSearchPath(arena, n) <=> begin.subspan(0, lcp - remaining.size()) == 0); - if (0) { - downLeftSpine: - for (; !n->entryPresent; n = getFirstChildExists(n)) { - } - return n->entry.rangeVersion <= readVersion; - } const int consumed = lcp - remaining.size(); assume(consumed >= 0);