Fix setOldestVersion
All checks were successful
Tests / Release [gcc] total: 471, passed: 471
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Reference build: <a href="https://jenkins.weaselab.dev/job/weaselab/job/conflict-set/job/main/40//gcc">weaselab » conflict-set » main #40</a>
Tests / Coverage total: 469, passed: 469
weaselab/conflict-set/pipeline/head This commit looks good
All checks were successful
Tests / Release [gcc] total: 471, passed: 471
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Reference build: <a href="https://jenkins.weaselab.dev/job/weaselab/job/conflict-set/job/main/40//gcc">weaselab » conflict-set » main #40</a>
Tests / Coverage total: 469, passed: 469
weaselab/conflict-set/pipeline/head This commit looks good
We were not accumulating keyUpdates strictly faster than we were spending them for a monotonically increasing workload.
This commit is contained in:
@@ -1851,11 +1851,11 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
auto begin = std::span<const uint8_t>(w.begin.p, w.begin.len);
|
auto begin = std::span<const uint8_t>(w.begin.p, w.begin.len);
|
||||||
auto end = std::span<const uint8_t>(w.end.p, w.end.len);
|
auto end = std::span<const uint8_t>(w.end.p, w.end.len);
|
||||||
if (w.end.len > 0) {
|
if (w.end.len > 0) {
|
||||||
keyUpdates += 2;
|
keyUpdates += 3;
|
||||||
addWriteRange(root, oldestVersion, begin, end, w.writeVersion,
|
addWriteRange(root, oldestVersion, begin, end, w.writeVersion,
|
||||||
&allocators, this);
|
&allocators, this);
|
||||||
} else {
|
} else {
|
||||||
keyUpdates += 1;
|
keyUpdates += 2;
|
||||||
addPointWrite(root, oldestVersion, begin, w.writeVersion, &allocators,
|
addPointWrite(root, oldestVersion, begin, w.writeVersion, &allocators,
|
||||||
this);
|
this);
|
||||||
}
|
}
|
||||||
@@ -1870,7 +1870,7 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
Node *prev = firstGeq(root, removalKey).n;
|
Node *prev = firstGeq(root, removalKey).n;
|
||||||
// There's no way to erase removalKey without introducing a key after it
|
// There's no way to erase removalKey without introducing a key after it
|
||||||
assert(prev != nullptr);
|
assert(prev != nullptr);
|
||||||
while (keyUpdates-- > 0) {
|
for (; keyUpdates > 0; --keyUpdates) {
|
||||||
Node *n = nextLogical(prev);
|
Node *n = nextLogical(prev);
|
||||||
if (n == nullptr) {
|
if (n == nullptr) {
|
||||||
removalKey = {};
|
removalKey = {};
|
||||||
|
Reference in New Issue
Block a user