From 25a1226667cc1279ac471de348c305ff89439cfa Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Tue, 27 Feb 2024 10:59:59 -0800 Subject: [PATCH] Fix setOldestVersion bug We should update the oldest version even if we don't have enough keyUpdates to do --- ConflictSet.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 25c8a29..c36c069 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -1863,10 +1863,13 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl { } void setOldestVersion(int64_t oldestVersion) { - if (oldestVersion <= this->oldestVersion || keyUpdates < 1000) { + if (oldestVersion <= this->oldestVersion) { return; } this->oldestVersion = oldestVersion; + if (keyUpdates < 1000) { + return; + } Node *prev = firstGeq(root, removalKey).n; // There's no way to erase removalKey without introducing a key after it assert(prev != nullptr);