diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 2a8084d..7aa3e40 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -2236,9 +2236,7 @@ template child->partialKeyLen = 0; child->parent = *self; child->parentsIndex = key.front(); - setMaxVersion(child, impl, - kBegin ? writeVersion - : std::numeric_limits::lowest()); + setMaxVersion(child, impl, kBegin ? writeVersion : 0); } self = &child; @@ -2899,7 +2897,7 @@ Iterator firstGeq(Node *n, std::string_view key) { [[maybe_unused]] int64_t checkMaxVersion(Node *root, Node *node, int64_t oldestVersion, bool &success, ConflictSet::Impl *impl) { - int64_t expected = std::numeric_limits::lowest(); + int64_t expected = 0; if (node->entryPresent) { expected = std::max(expected, node->entry.pointVersion); } diff --git a/include/ConflictSet.h b/include/ConflictSet.h index 64e7490..5bff07f 100644 --- a/include/ConflictSet.h +++ b/include/ConflictSet.h @@ -21,7 +21,7 @@ limitations under the License. #ifdef __cplusplus namespace weaselab { /** A data structure for optimistic concurrency control on ranges of - * bitwise-lexicographically-ordered keys. + * bitwise-lexicographically-ordered keys. All versions must be >= 0. * * Thread safety: * - It's safe to operate on two different ConflictSets in two different @@ -106,7 +106,7 @@ private: #else /** A data structure for optimistic concurrency control on ranges of - * bitwise-lexicographically-ordered keys. + * bitwise-lexicographically-ordered keys. All versions must be >= 0. * * Thread safety: * - It's safe to operate on two different ConflictSets in two different