Remove a check from setOldestVersion
This commit is contained in:
+6
-7
@@ -1554,13 +1554,12 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
// Any transaction prev would have prevented from committing is
|
// Any transaction prev would have prevented from committing is
|
||||||
// going to fail with TooOld anyway.
|
// going to fail with TooOld anyway.
|
||||||
|
|
||||||
// We still need to make sure that we don't introduce false positives by
|
// There's no way to insert a range such that range version of the right
|
||||||
// just removing it though.
|
// node is greater than the point version of the left node
|
||||||
if (n->entry.rangeVersion <= oldestVersion) {
|
assert(n->entry.rangeVersion <= oldestVersion);
|
||||||
prev->entryPresent = false;
|
prev->entryPresent = false;
|
||||||
if (prev->numChildren == 0 && prev->parent != nullptr) {
|
if (prev->numChildren == 0 && prev->parent != nullptr) {
|
||||||
eraseChild(prev->parent, prev->parentsIndex);
|
eraseChild(prev->parent, prev->parentsIndex);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
-3
@@ -427,6 +427,7 @@ struct ReferenceImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setOldestVersion(int64_t oldestVersion) {
|
void setOldestVersion(int64_t oldestVersion) {
|
||||||
|
assert(oldestVersion >= oldestVersion);
|
||||||
this->oldestVersion = oldestVersion;
|
this->oldestVersion = oldestVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -569,6 +570,11 @@ template <class ConflictSetImpl> struct TestDriver {
|
|||||||
CALLGRIND_STOP_INSTRUMENTATION;
|
CALLGRIND_STOP_INSTRUMENTATION;
|
||||||
#endif
|
#endif
|
||||||
refImpl.addWrites(writes, numPointWrites + numRangeWrites);
|
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);
|
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;
|
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.
BIN
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.
BIN
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.
BIN
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.
BIN
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
Reference in New Issue
Block a user