Remove a branch in happy path in addWrites
This commit is contained in:
@@ -3174,19 +3174,24 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
|
|
||||||
assert(writeVersion >= newestVersionFullPrecision);
|
assert(writeVersion >= newestVersionFullPrecision);
|
||||||
|
|
||||||
if (writeVersion > newestVersionFullPrecision + kNominalVersionWindow) {
|
if (oldestExtantVersion < writeVersion - kMaxCorrectVersionWindow)
|
||||||
destroyTree(root);
|
[[unlikely]] {
|
||||||
init(writeVersion - kNominalVersionWindow);
|
if (writeVersion > newestVersionFullPrecision + kNominalVersionWindow) {
|
||||||
}
|
destroyTree(root);
|
||||||
|
init(writeVersion - kNominalVersionWindow);
|
||||||
|
}
|
||||||
|
|
||||||
newestVersionFullPrecision = writeVersion;
|
newestVersionFullPrecision = writeVersion;
|
||||||
newest_version.set(newestVersionFullPrecision);
|
newest_version.set(newestVersionFullPrecision);
|
||||||
setOldestVersion(
|
setOldestVersion(newestVersionFullPrecision - kNominalVersionWindow);
|
||||||
std::max(oldestVersionFullPrecision,
|
while (oldestExtantVersion <
|
||||||
newestVersionFullPrecision - kNominalVersionWindow));
|
newestVersionFullPrecision - kMaxCorrectVersionWindow) {
|
||||||
while (oldestExtantVersion <
|
gcScanStep(1000);
|
||||||
newestVersionFullPrecision - kMaxCorrectVersionWindow) {
|
}
|
||||||
gcScanStep(1000);
|
} else {
|
||||||
|
newestVersionFullPrecision = writeVersion;
|
||||||
|
newest_version.set(newestVersionFullPrecision);
|
||||||
|
setOldestVersion(newestVersionFullPrecision - kNominalVersionWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
|
Reference in New Issue
Block a user