Remove redundant setMaxVersion calls
This commit is contained in:
@@ -2882,9 +2882,9 @@ checkMaxBetweenExclusiveImpl<true>(Node *n, int begin, int end,
|
||||
#endif
|
||||
|
||||
// Returns a pointer to the newly inserted node. Caller must set
|
||||
// `entryPresent`, `entry` fields and `maxVersion` on the result. The search
|
||||
// path of the result will have `maxVersion` at least `writeVersion` as
|
||||
// a postcondition. Nodes along the search path to `key` may be invalidated.
|
||||
// `entryPresent`, and `entry` fields. The search path of the result will have
|
||||
// `maxVersion` at least `writeVersion` as a postcondition. Nodes along the
|
||||
// search path to `key` may be invalidated.
|
||||
[[nodiscard]] Node *insert(Node **self, std::span<const uint8_t> key,
|
||||
InternalVersionT writeVersion, WriteContext *tls,
|
||||
ConflictSet::Impl *impl) {
|
||||
@@ -3001,7 +3001,6 @@ void addPointWrite(Node *&root, std::span<const uint8_t> key,
|
||||
n->entryPresent = true;
|
||||
|
||||
n->entry.pointVersion = writeVersion;
|
||||
setMaxVersion(n, impl, writeVersion);
|
||||
n->entry.rangeVersion =
|
||||
p == nullptr ? tls->zero : std::max(p->entry.rangeVersion, tls->zero);
|
||||
} else {
|
||||
@@ -3108,10 +3107,7 @@ void addWriteRange(Node *&root, std::span<const uint8_t> begin,
|
||||
beginNode->entry.rangeVersion =
|
||||
p == nullptr ? tls->zero : std::max(p->entry.rangeVersion, tls->zero);
|
||||
beginNode->entry.pointVersion = writeVersion;
|
||||
assert(maxVersion(beginNode, impl) <= writeVersion);
|
||||
setMaxVersion(beginNode, impl, writeVersion);
|
||||
}
|
||||
setMaxVersion(beginNode, impl, writeVersion);
|
||||
assert(writeVersion >= beginNode->entry.pointVersion);
|
||||
beginNode->entry.pointVersion = writeVersion;
|
||||
|
||||
|
Reference in New Issue
Block a user