Fix gc-too-slow issue
Previously, with a finite set of keys, latest_extant_version could fall all the way behind so that a call to addWrites would have to do O(n) work eventually.
This commit is contained in:
@@ -4412,6 +4412,9 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
assert(writeContext.accum.entries_erased == 0);
|
assert(writeContext.accum.entries_erased == 0);
|
||||||
assert(writeContext.accum.entries_inserted == 0);
|
assert(writeContext.accum.entries_inserted == 0);
|
||||||
|
|
||||||
|
// Queue up some gc work just for (potentially) increasing the version
|
||||||
|
++keyUpdates;
|
||||||
|
|
||||||
if (oldestExtantVersion < writeVersion - kMaxCorrectVersionWindow)
|
if (oldestExtantVersion < writeVersion - kMaxCorrectVersionWindow)
|
||||||
[[unlikely]] {
|
[[unlikely]] {
|
||||||
if (writeVersion > newestVersionFullPrecision + kNominalVersionWindow) {
|
if (writeVersion > newestVersionFullPrecision + kNominalVersionWindow) {
|
||||||
|
Reference in New Issue
Block a user