Require entry present for fixupMaxVersion

This commit is contained in:
2024-08-06 17:59:38 -07:00
parent 781ba15cae
commit ded6e7fc2c

View File

@@ -3049,13 +3049,11 @@ void addPointWrite(Node *&root, std::span<const uint8_t> key,
} }
} }
// Precondition: `node->entryPresent`
void fixupMaxVersion(Node *node, ConflictSet::Impl *impl, WriteContext *tls) { void fixupMaxVersion(Node *node, ConflictSet::Impl *impl, WriteContext *tls) {
InternalVersionT max; InternalVersionT max;
if (node->entryPresent) { assert(node->entryPresent);
max = std::max(node->entry.pointVersion, tls->zero); max = std::max(node->entry.pointVersion, tls->zero);
} else {
max = tls->zero;
}
switch (node->getType()) { switch (node->getType()) {
case Type_Node0: case Type_Node0:
break; break;