Run gc less frequently
But still run it to account for the version potentially increasing
This commit is contained in:
@@ -5128,9 +5128,6 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
assert(writeContext.accum.entries_erased == 0);
|
||||
assert(writeContext.accum.entries_inserted == 0);
|
||||
|
||||
// Queue up some gc work just for (potentially) increasing the version
|
||||
++keyUpdates;
|
||||
|
||||
if (oldestExtantVersion < writeVersion - kMaxCorrectVersionWindow)
|
||||
[[unlikely]] {
|
||||
if (writeVersion > newestVersionFullPrecision + kNominalVersionWindow) {
|
||||
@@ -5187,10 +5184,11 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
|
||||
writeContext.releaseDeferred();
|
||||
|
||||
// Run gc at least 200% the rate we're inserting entries
|
||||
// Run gc at least 200% the rate we're inserting entries, and at least run
|
||||
// some gc just for potentially increasing the version.
|
||||
keyUpdates += std::max<int64_t>(writeContext.accum.entries_inserted -
|
||||
writeContext.accum.entries_erased,
|
||||
0) *
|
||||
1) *
|
||||
2;
|
||||
|
||||
point_writes_total.add(writeContext.accum.point_writes);
|
||||
|
Reference in New Issue
Block a user