Interface change! Allow decreasing setOldestVersion
All checks were successful
Tests / Clang total: 1305, passed: 1305
Clang |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / SIMD fallback total: 1305, passed: 1305
Tests / 32-bit versions total: 1305, passed: 1305
Tests / Release [gcc] total: 1305, passed: 1305
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 973, passed: 973
Tests / Coverage total: 980, passed: 980
Code Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 98.74% (1572/1592) * Branch Coverage: 65.29% (1420/2175) * Complexity Density: 0.00% * Lines of Code: 1592 #### Quality Gates Summary Output truncated.
weaselab/conflict-set/pipeline/head This commit looks good

This commit is contained in:
2024-07-03 10:31:57 -07:00
parent 982b31af34
commit 3db3d975fc
3 changed files with 8 additions and 10 deletions

View File

@@ -3204,11 +3204,7 @@ Iterator firstGeqLogical(Node *n, const std::span<const uint8_t> key) {
} else { } else {
n = nextSibling(n); n = nextSibling(n);
if (n == nullptr) { if (n == nullptr) {
// This line is genuinely unreachable from any entry point of the return {nullptr, 1};
// final library, since we can't remove a key without introducing a
// key after it, and the only production caller of firstGeq is for
// resuming the setOldestVersion scan.
return {nullptr, 1}; // GCOVR_EXCL_LINE
} }
goto downLeftSpine; goto downLeftSpine;
} }
@@ -3489,8 +3485,8 @@ void checkVersionsGeqOldestExtant(Node *n,
assert(m >= oldestExtantVersion); assert(m >= oldestExtantVersion);
} }
} break; } break;
default: // GCOVR_EXCL_LINE default:
__builtin_unreachable(); // GCOVR_EXCL_LINE abort();
} }
} }

View File

@@ -634,7 +634,9 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
} }
void setOldestVersion(int64_t oldestVersion) { void setOldestVersion(int64_t oldestVersion) {
assert(oldestVersion >= this->oldestVersion); if (oldestVersion < this->oldestVersion) {
return;
}
this->oldestVersion = oldestVersion; this->oldestVersion = oldestVersion;
SkipList::Finger finger; SkipList::Finger finger;
int temp; int temp;

View File

@@ -77,8 +77,8 @@ struct __attribute__((__visibility__("default"))) ConflictSet {
* versions. */ * versions. */
void addWrites(const WriteRange *writes, int count, int64_t writeVersion); void addWrites(const WriteRange *writes, int count, int64_t writeVersion);
/** Reads where readVersion < oldestVersion will result in `TooOld`. Must be /** Reads where readVersion < oldestVersion will result in `TooOld`. Ignored
* greater than or equal to all previous oldest versions. */ * if not greater than or equal to all previous oldest versions. */
void setOldestVersion(int64_t oldestVersion); void setOldestVersion(int64_t oldestVersion);
/** Reads where readVersion < oldestVersion will result in `TooOld`. There are /** Reads where readVersion < oldestVersion will result in `TooOld`. There are