forked from weaselab/conflict-set
Fix an issue where gc wasn't outpacing writes
This commit is contained in:
+5
-1
@@ -3070,8 +3070,12 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
rootMaxVersion = std::max(rootMaxVersion, oldestVersion);
|
rootMaxVersion = std::max(rootMaxVersion, oldestVersion);
|
||||||
n = nextPhysical(n);
|
n = nextPhysical(n);
|
||||||
}
|
}
|
||||||
for (; fuel > 0 && n != nullptr; --fuel) {
|
for (; fuel > 0 && n != nullptr;) {
|
||||||
rezero(n, oldestVersion);
|
rezero(n, oldestVersion);
|
||||||
|
// The "make sure gc keeps up with writes" calculations assume that we're
|
||||||
|
// scanning key by key, not node by node. Make sure we only spend fuel
|
||||||
|
// when there's a logical entry.
|
||||||
|
fuel -= n->entryPresent;
|
||||||
if (n->entryPresent && std::max(n->entry.pointVersion,
|
if (n->entryPresent && std::max(n->entry.pointVersion,
|
||||||
n->entry.rangeVersion) <= oldestVersion) {
|
n->entry.rangeVersion) <= oldestVersion) {
|
||||||
// Any transaction n would have prevented from committing is
|
// Any transaction n would have prevented from committing is
|
||||||
|
|||||||
Reference in New Issue
Block a user