forked from weaselab/conflict-set
Fix issue with getSearchPath on nullptr on setOldestVersion
This commit is contained in:
+5
-6
@@ -2033,12 +2033,7 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
if (n == root) {
|
if (n == root) {
|
||||||
n = nextLogical(n);
|
n = nextLogical(n);
|
||||||
}
|
}
|
||||||
for (; keyUpdates > 0; --keyUpdates) {
|
for (; keyUpdates > 0 && n != nullptr; --keyUpdates) {
|
||||||
if (n == nullptr) {
|
|
||||||
removalKey = {};
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (std::max(n->entry.pointVersion, n->entry.rangeVersion) <=
|
if (std::max(n->entry.pointVersion, n->entry.rangeVersion) <=
|
||||||
oldestVersion) {
|
oldestVersion) {
|
||||||
// Any transaction n would have prevented from committing is
|
// Any transaction n would have prevented from committing is
|
||||||
@@ -2052,6 +2047,10 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
n = nextLogical(n);
|
n = nextLogical(n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (n == nullptr) {
|
||||||
|
removalKey = {};
|
||||||
|
return;
|
||||||
|
}
|
||||||
removalKeyArena = Arena();
|
removalKeyArena = Arena();
|
||||||
removalKey = getSearchPath(removalKeyArena, n);
|
removalKey = getSearchPath(removalKeyArena, n);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user