Fix setOldestVersion bug

We should update the oldest version even if we don't have enough
keyUpdates to do
This commit is contained in:
2024-02-27 10:59:59 -08:00
parent d4d2dbcbda
commit 25a1226667

View File

@@ -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);