Check more preconditions in Debug mode
All checks were successful
Tests / Clang total: 2843, passed: 2843
Clang |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / 64 bit versions total: 2843, passed: 2843
Tests / Debug total: 2841, passed: 2841
Tests / SIMD fallback total: 2843, passed: 2843
Tests / Release [gcc] total: 2843, passed: 2843
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 2119, passed: 2119
Tests / Coverage total: 2136, passed: 2136
Code Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 98.92% (1834/1854)
* Branch Coverage: 66.85% (1496/2238)
* Complexity Density: 0.00
* Lines of Code: 1854
#### Quality Gates Summary
Output truncated.
weaselab/conflict-set/pipeline/head This commit looks good
All checks were successful
Tests / Clang total: 2843, passed: 2843
Clang |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / 64 bit versions total: 2843, passed: 2843
Tests / Debug total: 2841, passed: 2841
Tests / SIMD fallback total: 2843, passed: 2843
Tests / Release [gcc] total: 2843, passed: 2843
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 2119, passed: 2119
Tests / Coverage total: 2136, passed: 2136
Code Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 98.92% (1834/1854)
* Branch Coverage: 66.85% (1496/2238)
* Complexity Density: 0.00
* Lines of Code: 1854
#### Quality Gates Summary
Output truncated.
weaselab/conflict-set/pipeline/head This commit looks good
This commit is contained in:
@@ -2912,8 +2912,7 @@ checkMaxBetweenExclusiveImpl<true>(Node *n, int begin, int end,
|
|||||||
// of the result will have `maxVersion` set to `writeVersion` as a
|
// of the result will have `maxVersion` set to `writeVersion` as a
|
||||||
// postcondition. Nodes along the search path may be invalidated. Callers must
|
// postcondition. Nodes along the search path may be invalidated. Callers must
|
||||||
// ensure that the max version of the self argument is updated.
|
// ensure that the max version of the self argument is updated.
|
||||||
[[nodiscard]]
|
[[nodiscard]] Node **insert(Node **self, std::span<const uint8_t> key,
|
||||||
Node **insert(Node **self, std::span<const uint8_t> key,
|
|
||||||
InternalVersionT writeVersion, WriteContext *tls) {
|
InternalVersionT writeVersion, WriteContext *tls) {
|
||||||
|
|
||||||
for (; key.size() != 0; ++tls->accum.insert_iterations) {
|
for (; key.size() != 0; ++tls->accum.insert_iterations) {
|
||||||
@@ -3149,6 +3148,7 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
tls.impl = this;
|
tls.impl = this;
|
||||||
int64_t check_byte_accum = 0;
|
int64_t check_byte_accum = 0;
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
|
assert(reads[i].readVersion >= 0);
|
||||||
assert(reads[i].readVersion <= newestVersionFullPrecision);
|
assert(reads[i].readVersion <= newestVersionFullPrecision);
|
||||||
const auto &r = reads[i];
|
const auto &r = reads[i];
|
||||||
check_byte_accum += r.begin.len + r.end.len;
|
check_byte_accum += r.begin.len + r.end.len;
|
||||||
@@ -3206,7 +3206,10 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
|
|
||||||
newestVersionFullPrecision = writeVersion;
|
newestVersionFullPrecision = writeVersion;
|
||||||
newest_version.set(newestVersionFullPrecision);
|
newest_version.set(newestVersionFullPrecision);
|
||||||
|
if (newestVersionFullPrecision - kNominalVersionWindow >
|
||||||
|
oldestVersionFullPrecision) {
|
||||||
setOldestVersion(newestVersionFullPrecision - kNominalVersionWindow);
|
setOldestVersion(newestVersionFullPrecision - kNominalVersionWindow);
|
||||||
|
}
|
||||||
while (oldestExtantVersion <
|
while (oldestExtantVersion <
|
||||||
newestVersionFullPrecision - kMaxCorrectVersionWindow) {
|
newestVersionFullPrecision - kMaxCorrectVersionWindow) {
|
||||||
gcScanStep(1000);
|
gcScanStep(1000);
|
||||||
@@ -3214,8 +3217,11 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
} else {
|
} else {
|
||||||
newestVersionFullPrecision = writeVersion;
|
newestVersionFullPrecision = writeVersion;
|
||||||
newest_version.set(newestVersionFullPrecision);
|
newest_version.set(newestVersionFullPrecision);
|
||||||
|
if (newestVersionFullPrecision - kNominalVersionWindow >
|
||||||
|
oldestVersionFullPrecision) {
|
||||||
setOldestVersion(newestVersionFullPrecision - kNominalVersionWindow);
|
setOldestVersion(newestVersionFullPrecision - kNominalVersionWindow);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
const auto &w = writes[i];
|
const auto &w = writes[i];
|
||||||
@@ -3299,13 +3305,18 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
return fuel;
|
return fuel;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setOldestVersion(int64_t o) {
|
void setOldestVersion(int64_t newOldestVersion) {
|
||||||
assert(o <= newestVersionFullPrecision);
|
assert(newOldestVersion >= 0);
|
||||||
if (o <= oldestVersionFullPrecision) {
|
assert(newOldestVersion <= newestVersionFullPrecision);
|
||||||
|
// If addWrites advances oldestVersion to keep within valid window, a
|
||||||
|
// subsequent setOldestVersion can be legitimately called with a version
|
||||||
|
// older than `oldestVersionFullPrecision`. < instead of <= so that we can
|
||||||
|
// do garbage collection work without advancing the oldest version.
|
||||||
|
if (newOldestVersion < oldestVersionFullPrecision) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
InternalVersionT oldestVersion{o};
|
InternalVersionT oldestVersion{newOldestVersion};
|
||||||
this->oldestVersionFullPrecision = o;
|
this->oldestVersionFullPrecision = newOldestVersion;
|
||||||
this->oldestVersion = oldestVersion;
|
this->oldestVersion = oldestVersion;
|
||||||
#if !USE_64_BIT
|
#if !USE_64_BIT
|
||||||
InternalVersionT::zero = tls.zero = oldestVersion;
|
InternalVersionT::zero = tls.zero = oldestVersion;
|
||||||
@@ -3366,6 +3377,7 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
explicit Impl(int64_t oldestVersion) {
|
explicit Impl(int64_t oldestVersion) {
|
||||||
|
assert(oldestVersion >= 0);
|
||||||
init(oldestVersion);
|
init(oldestVersion);
|
||||||
initMetrics();
|
initMetrics();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user