Include childType in ChildAndMaxVersion
Some checks failed
Tests / Clang total: 3339, passed: 3339
Clang |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / 64 bit versions total: 3339, passed: 3339
Tests / Debug total: 3337, passed: 3337
weaselab/conflict-set/pipeline/head There was a failure building this commit
Some checks failed
Tests / Clang total: 3339, passed: 3339
Clang |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / 64 bit versions total: 3339, passed: 3339
Tests / Debug total: 3337, passed: 3337
weaselab/conflict-set/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -1132,6 +1132,7 @@ Node *getChild(Node *self, uint8_t index) {
|
|||||||
struct ChildAndMaxVersion {
|
struct ChildAndMaxVersion {
|
||||||
Node *child;
|
Node *child;
|
||||||
InternalVersionT maxVersion;
|
InternalVersionT maxVersion;
|
||||||
|
Type childType;
|
||||||
};
|
};
|
||||||
|
|
||||||
ChildAndMaxVersion getChildAndMaxVersion(Node0 *, uint8_t) { return {}; }
|
ChildAndMaxVersion getChildAndMaxVersion(Node0 *, uint8_t) { return {}; }
|
||||||
@@ -1140,24 +1141,28 @@ ChildAndMaxVersion getChildAndMaxVersion(Node3 *self, uint8_t index) {
|
|||||||
if (i < 0) {
|
if (i < 0) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
return {self->children[i], self->childMaxVersion[i]};
|
return {self->children[i], self->childMaxVersion[i],
|
||||||
|
self->children[i].getType()};
|
||||||
}
|
}
|
||||||
ChildAndMaxVersion getChildAndMaxVersion(Node16 *self, uint8_t index) {
|
ChildAndMaxVersion getChildAndMaxVersion(Node16 *self, uint8_t index) {
|
||||||
int i = getNodeIndex(self, index);
|
int i = getNodeIndex(self, index);
|
||||||
if (i < 0) {
|
if (i < 0) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
return {self->children[i], self->childMaxVersion[i]};
|
return {self->children[i], self->childMaxVersion[i],
|
||||||
|
self->children[i].getType()};
|
||||||
}
|
}
|
||||||
ChildAndMaxVersion getChildAndMaxVersion(Node48 *self, uint8_t index) {
|
ChildAndMaxVersion getChildAndMaxVersion(Node48 *self, uint8_t index) {
|
||||||
int i = self->index[index];
|
int i = self->index[index];
|
||||||
if (i < 0) {
|
if (i < 0) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
return {self->children[i], self->childMaxVersion[i]};
|
return {self->children[i], self->childMaxVersion[i],
|
||||||
|
self->children[i].getType()};
|
||||||
}
|
}
|
||||||
ChildAndMaxVersion getChildAndMaxVersion(Node256 *self, uint8_t index) {
|
ChildAndMaxVersion getChildAndMaxVersion(Node256 *self, uint8_t index) {
|
||||||
return {self->children[index], self->childMaxVersion[index]};
|
return {self->children[index], self->childMaxVersion[index],
|
||||||
|
self->children[index].getType()};
|
||||||
}
|
}
|
||||||
|
|
||||||
ChildAndMaxVersion getChildAndMaxVersion(Node *self, uint8_t index) {
|
ChildAndMaxVersion getChildAndMaxVersion(Node *self, uint8_t index) {
|
||||||
@@ -1973,7 +1978,7 @@ bool checkPointRead(Node *n, const std::span<const uint8_t> key,
|
|||||||
goto downLeftSpine;
|
goto downLeftSpine;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto [child, maxV] = getChildAndMaxVersion(n, remaining[0]);
|
auto [child, maxV, childT] = getChildAndMaxVersion(n, remaining[0]);
|
||||||
if (child == nullptr) {
|
if (child == nullptr) {
|
||||||
auto c = getChildGeq(n, remaining[0]);
|
auto c = getChildGeq(n, remaining[0]);
|
||||||
if (c != nullptr) {
|
if (c != nullptr) {
|
||||||
@@ -2043,7 +2048,7 @@ bool checkPrefixRead(Node *n, const std::span<const uint8_t> key,
|
|||||||
return maxVersion(n) <= readVersion;
|
return maxVersion(n) <= readVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto [child, maxV] = getChildAndMaxVersion(n, remaining[0]);
|
auto [child, maxV, childT] = getChildAndMaxVersion(n, remaining[0]);
|
||||||
if (child == nullptr) {
|
if (child == nullptr) {
|
||||||
auto c = getChildGeq(n, remaining[0]);
|
auto c = getChildGeq(n, remaining[0]);
|
||||||
if (c != nullptr) {
|
if (c != nullptr) {
|
||||||
@@ -2642,7 +2647,7 @@ bool checkRangeLeftSide(Node *n, std::span<const uint8_t> key, int prefixLen,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto [child, maxV] = getChildAndMaxVersion(n, remaining[0]);
|
auto [child, maxV, childT] = getChildAndMaxVersion(n, remaining[0]);
|
||||||
if (child == nullptr) {
|
if (child == nullptr) {
|
||||||
auto c = getChildGeq(n, remaining[0]);
|
auto c = getChildGeq(n, remaining[0]);
|
||||||
if (c != nullptr) {
|
if (c != nullptr) {
|
||||||
@@ -2830,7 +2835,7 @@ bool checkRangeRead(Node *n, std::span<const uint8_t> begin,
|
|||||||
if (remaining.size() == 0) {
|
if (remaining.size() == 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
auto [child, v] = getChildAndMaxVersion(n, remaining[0]);
|
auto [child, v, childT] = getChildAndMaxVersion(n, remaining[0]);
|
||||||
if (child == nullptr) {
|
if (child == nullptr) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user