forked from weaselab/conflict-set
Fixed missed usages of longestCommonPrefixPartialKey
This commit is contained in:
+4
-2
@@ -828,7 +828,8 @@ bool checkPointRead(Node *n, const std::span<const uint8_t> key,
|
|||||||
|
|
||||||
if (n->partialKeyLen > 0) {
|
if (n->partialKeyLen > 0) {
|
||||||
int commonLen = std::min<int>(n->partialKeyLen, remaining.size());
|
int commonLen = std::min<int>(n->partialKeyLen, remaining.size());
|
||||||
int i = longestCommonPrefix(n->partialKey, remaining.data(), commonLen);
|
int i = longestCommonPrefixPartialKey(n->partialKey, remaining.data(),
|
||||||
|
commonLen);
|
||||||
if (i < commonLen) {
|
if (i < commonLen) {
|
||||||
auto c = n->partialKey[i] <=> remaining[i];
|
auto c = n->partialKey[i] <=> remaining[i];
|
||||||
if (c > 0) {
|
if (c > 0) {
|
||||||
@@ -1088,7 +1089,8 @@ struct CheckRangeLeftSide {
|
|||||||
|
|
||||||
if (n->partialKeyLen > 0) {
|
if (n->partialKeyLen > 0) {
|
||||||
int commonLen = std::min<int>(n->partialKeyLen, remaining.size());
|
int commonLen = std::min<int>(n->partialKeyLen, remaining.size());
|
||||||
int i = longestCommonPrefix(n->partialKey, remaining.data(), commonLen);
|
int i = longestCommonPrefixPartialKey(n->partialKey, remaining.data(),
|
||||||
|
commonLen);
|
||||||
searchPathLen += i;
|
searchPathLen += i;
|
||||||
if (i < commonLen) {
|
if (i < commonLen) {
|
||||||
auto c = n->partialKey[i] <=> remaining[i];
|
auto c = n->partialKey[i] <=> remaining[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user