Remove a check from setOldestVersion

This commit is contained in:
2024-02-19 16:20:04 -08:00
parent c9baa80212
commit cb2f66b4b7
474 changed files with 13 additions and 11 deletions

View File

@@ -1554,15 +1554,14 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
// Any transaction prev would have prevented from committing is
// going to fail with TooOld anyway.
// We still need to make sure that we don't introduce false positives by
// just removing it though.
if (n->entry.rangeVersion <= oldestVersion) {
// There's no way to insert a range such that range version of the right
// node is greater than the point version of the left node
assert(n->entry.rangeVersion <= oldestVersion);
prev->entryPresent = false;
if (prev->numChildren == 0 && prev->parent != nullptr) {
eraseChild(prev->parent, prev->parentsIndex);
}
}
}
prev = n;
}

View File

@@ -427,6 +427,7 @@ struct ReferenceImpl {
}
void setOldestVersion(int64_t oldestVersion) {
assert(oldestVersion >= oldestVersion);
this->oldestVersion = oldestVersion;
}
@@ -569,6 +570,11 @@ template <class ConflictSetImpl> struct TestDriver {
CALLGRIND_STOP_INSTRUMENTATION;
#endif
refImpl.addWrites(writes, numPointWrites + numRangeWrites);
oldestVersion = std::max<int64_t>(writeVersion - arbitrary.bounded(10),
oldestVersion);
cs.setOldestVersion(oldestVersion);
refImpl.setOldestVersion(oldestVersion);
}
{
int numPointReads = arbitrary.bounded(100);
@@ -659,9 +665,6 @@ template <class ConflictSetImpl> struct TestDriver {
}
}
}
oldestVersion += arbitrary.bounded(2);
cs.setOldestVersion(oldestVersion);
refImpl.setOldestVersion(oldestVersion);
return false;
}
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More