Fix missed update for Node48::maxOfMax

This commit is contained in:
2024-06-26 22:11:33 -07:00
parent cce7d29410
commit bb0e654040

View File

@@ -1365,6 +1365,10 @@ Node *erase(Node *self, NodeAllocators *allocators, ConflictSet::Impl *impl,
if (toRemoveChildrenIndex != lastChildrenIndex) { if (toRemoveChildrenIndex != lastChildrenIndex) {
parent48->children[toRemoveChildrenIndex] = parent48->children[toRemoveChildrenIndex] =
parent48->children[lastChildrenIndex]; parent48->children[lastChildrenIndex];
parent48->maxOfMax[toRemoveChildrenIndex >> Node48::kMaxOfMaxShift] =
std::max(parent48->maxOfMax[toRemoveChildrenIndex >>
Node48::kMaxOfMaxShift],
parent48->children[toRemoveChildrenIndex].childMaxVersion);
auto parentIndex = auto parentIndex =
parent48->children[toRemoveChildrenIndex].child->parentsIndex; parent48->children[toRemoveChildrenIndex].child->parentsIndex;
parent48->index[parentIndex] = toRemoveChildrenIndex; parent48->index[parentIndex] = toRemoveChildrenIndex;