Compare commits
2 Commits
9dec45317e
...
2646d5eaf1
Author | SHA1 | Date | |
---|---|---|---|
2646d5eaf1 | |||
0367ba9856 |
@@ -1708,6 +1708,83 @@ downLeftSpine:
|
||||
}
|
||||
}
|
||||
|
||||
// Logically this is the same as performing firstGeq and then checking against
|
||||
// max version or range version if this prefix doesn't exist, but this version
|
||||
// short circuits as soon as it can prove that there's no conflict.
|
||||
bool checkPrefixRead(Node *n, const std::span<const uint8_t> key,
|
||||
InternalVersionT readVersion, ConflictSet::Impl *impl) {
|
||||
#if DEBUG_VERBOSE && !defined(NDEBUG)
|
||||
fprintf(stderr, "Check prefix read: %s\n", printable(key).c_str());
|
||||
#endif
|
||||
auto remaining = key;
|
||||
for (;;) {
|
||||
auto m = maxVersion(n, impl);
|
||||
if (remaining.size() == 0) {
|
||||
return m <= readVersion;
|
||||
}
|
||||
|
||||
if (m <= readVersion) {
|
||||
return true;
|
||||
}
|
||||
|
||||
auto *child = getChild(n, remaining[0]);
|
||||
if (child == nullptr) {
|
||||
int c = getChildGeq(n, remaining[0]);
|
||||
if (c >= 0) {
|
||||
n = getChildExists(n, c);
|
||||
goto downLeftSpine;
|
||||
} else {
|
||||
n = nextSibling(n);
|
||||
if (n == nullptr) {
|
||||
return true;
|
||||
}
|
||||
goto downLeftSpine;
|
||||
}
|
||||
}
|
||||
|
||||
n = child;
|
||||
remaining = remaining.subspan(1, remaining.size() - 1);
|
||||
|
||||
if (n->partialKeyLen > 0) {
|
||||
int commonLen = std::min<int>(n->partialKeyLen, remaining.size());
|
||||
int i = longestCommonPrefix(n->partialKey(), remaining.data(), commonLen);
|
||||
if (i < commonLen) {
|
||||
auto c = n->partialKey()[i] <=> remaining[i];
|
||||
if (c > 0) {
|
||||
goto downLeftSpine;
|
||||
} else {
|
||||
n = nextSibling(n);
|
||||
if (n == nullptr) {
|
||||
return true;
|
||||
}
|
||||
goto downLeftSpine;
|
||||
}
|
||||
}
|
||||
if (commonLen == n->partialKeyLen) {
|
||||
// partial key matches
|
||||
remaining = remaining.subspan(commonLen, remaining.size() - commonLen);
|
||||
} else if (n->partialKeyLen > int(remaining.size())) {
|
||||
// n is the first physical node greater than remaining, and there's no
|
||||
// eq node. All physical nodes that start with prefix are reachable from
|
||||
// n.
|
||||
if (maxVersion(n, impl) > readVersion) {
|
||||
return false;
|
||||
}
|
||||
goto downLeftSpine;
|
||||
}
|
||||
}
|
||||
}
|
||||
downLeftSpine:
|
||||
for (;;) {
|
||||
if (n->entryPresent) {
|
||||
return n->entry.rangeVersion <= readVersion;
|
||||
}
|
||||
int c = getChildGeq(n, 0);
|
||||
assert(c >= 0);
|
||||
n = getChildExists(n, c);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAS_AVX
|
||||
uint32_t compare16_32bit(const InternalVersionT *vs, InternalVersionT rv) {
|
||||
uint32_t compared = 0;
|
||||
@@ -1890,7 +1967,7 @@ bool checkMaxBetweenExclusive(Node *n, int begin, int end,
|
||||
InternalVersionT readVersion) {
|
||||
assume(-1 <= begin);
|
||||
assume(begin <= 256);
|
||||
assume(-1 <= end);
|
||||
assume(0 < end);
|
||||
assume(end <= 256);
|
||||
assume(begin < end);
|
||||
|
||||
@@ -1962,9 +2039,6 @@ bool checkMaxBetweenExclusive(Node *n, int begin, int end,
|
||||
case Type_Node256: {
|
||||
static_assert(Node256::kMaxOfMaxTotalPages == 16);
|
||||
auto *self = static_cast<Node256 *>(n);
|
||||
if (end <= 0) {
|
||||
return true;
|
||||
}
|
||||
const int firstPage = begin >> Node256::kMaxOfMaxShift;
|
||||
const int lastPage = (end - 1) >> Node256::kMaxOfMaxShift;
|
||||
// Check the only page if there's only one
|
||||
@@ -2367,6 +2441,10 @@ bool checkRangeReadImpl(Node *n, std::span<const uint8_t> begin,
|
||||
end.back() == 0) {
|
||||
return checkPointRead(n, begin, readVersion, impl);
|
||||
}
|
||||
if (lcp == int(begin.size() - 1) && end.size() == begin.size() &&
|
||||
int(begin.back()) + 1 == int(end.back())) {
|
||||
return checkPrefixRead(n, begin, readVersion, impl);
|
||||
}
|
||||
|
||||
SearchStepWise search{n, begin.subspan(0, lcp)};
|
||||
Arena arena;
|
||||
|
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
@@ -123,8 +123,7 @@ pipeline {
|
||||
'''
|
||||
recordCoverage qualityGates: [[criticality: 'NOTE', metric: 'MODULE']], tools: [[parser: 'COBERTURA', pattern: 'build/coverage.xml']]
|
||||
sh '''
|
||||
# Temporarily remove until we finish the transition to 32-bit versions
|
||||
# gcovr -f ConflictSet.cpp --fail-under-line 100 > /dev/null
|
||||
gcovr -f ConflictSet.cpp --fail-under-line 100 > /dev/null
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
BIN
corpus/0020a3ab4a0de649bf7b8966c9065405b64229e8
Normal file
BIN
corpus/0020a3ab4a0de649bf7b8966c9065405b64229e8
Normal file
Binary file not shown.
BIN
corpus/0133cf3a9984eb4e45fd166cdcc136619fcfda32
Normal file
BIN
corpus/0133cf3a9984eb4e45fd166cdcc136619fcfda32
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/0185228b4b3455b1a542009007ceb974db6d98af
Normal file
BIN
corpus/0185228b4b3455b1a542009007ceb974db6d98af
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
corpus/01fbab54a0d97fb88b0ed4863892e56db715656f
Normal file
BIN
corpus/01fbab54a0d97fb88b0ed4863892e56db715656f
Normal file
Binary file not shown.
BIN
corpus/0208b56e9abfd4f37d871dc89e4801a2eb90fae5
Normal file
BIN
corpus/0208b56e9abfd4f37d871dc89e4801a2eb90fae5
Normal file
Binary file not shown.
BIN
corpus/020f1d7a4ef05f035b7edf9e2bdbf99c4ba038b8
Normal file
BIN
corpus/020f1d7a4ef05f035b7edf9e2bdbf99c4ba038b8
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/0242543101d75ef9e557d1c7eeebe639a10620b9
Normal file
BIN
corpus/0242543101d75ef9e557d1c7eeebe639a10620b9
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/02abc409ed03c67e3da635f9db83cbb6b9bd7f3c
Normal file
BIN
corpus/02abc409ed03c67e3da635f9db83cbb6b9bd7f3c
Normal file
Binary file not shown.
BIN
corpus/02c7e951a4ab7f63e1ec1003f4865b93c8f90721
Normal file
BIN
corpus/02c7e951a4ab7f63e1ec1003f4865b93c8f90721
Normal file
Binary file not shown.
BIN
corpus/03452330deff47b3363f1019379c65b21908b43f
Normal file
BIN
corpus/03452330deff47b3363f1019379c65b21908b43f
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/03b588ed7a235250157891230af6de1e04bf006d
Normal file
BIN
corpus/03b588ed7a235250157891230af6de1e04bf006d
Normal file
Binary file not shown.
BIN
corpus/042799793e7c063b20e0e55bbcc96f01f91bdd04
Normal file
BIN
corpus/042799793e7c063b20e0e55bbcc96f01f91bdd04
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/04afb73ee2885691dd2dd62d5b04704b49a90a54
Normal file
BIN
corpus/04afb73ee2885691dd2dd62d5b04704b49a90a54
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
corpus/06b483dbba432b8972f9fc89222a41a27f3b8e96
Normal file
BIN
corpus/06b483dbba432b8972f9fc89222a41a27f3b8e96
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/07b6e1f5e080bbcb96f3556ee0162e6289e3c9bc
Normal file
BIN
corpus/07b6e1f5e080bbcb96f3556ee0162e6289e3c9bc
Normal file
Binary file not shown.
BIN
corpus/07b7709b720312478bc91ebc568e035644b006f6
Normal file
BIN
corpus/07b7709b720312478bc91ebc568e035644b006f6
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/08732f5857874285c5bceeb686b33687408ee4af
Normal file
BIN
corpus/08732f5857874285c5bceeb686b33687408ee4af
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/093362f8fc387e49a1b0f31a0fe5e82416aeed5b
Normal file
BIN
corpus/093362f8fc387e49a1b0f31a0fe5e82416aeed5b
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/09e2d3949b7c2c68b582a58b69a1fe719fc93edf
Normal file
BIN
corpus/09e2d3949b7c2c68b582a58b69a1fe719fc93edf
Normal file
Binary file not shown.
BIN
corpus/0a0f24698c6b6b548e01b69142e4fe2d248890ba
Normal file
BIN
corpus/0a0f24698c6b6b548e01b69142e4fe2d248890ba
Normal file
Binary file not shown.
BIN
corpus/0b12266d8a7e1a094fd38f2a98bc578d09c418ab
Normal file
BIN
corpus/0b12266d8a7e1a094fd38f2a98bc578d09c418ab
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
corpus/0c941ffcc53038e5db60a1cad7a3ad77c5d88fb9
Normal file
BIN
corpus/0c941ffcc53038e5db60a1cad7a3ad77c5d88fb9
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/0d0078bad6b47befd6f8723fcc4babe36b453a4b
Normal file
BIN
corpus/0d0078bad6b47befd6f8723fcc4babe36b453a4b
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/0d7e8c09fd026b7cceb559fe5344183c89a550bc
Normal file
BIN
corpus/0d7e8c09fd026b7cceb559fe5344183c89a550bc
Normal file
Binary file not shown.
BIN
corpus/0f4ecf072e9ae7a01ff27513e770363b0ba926ce
Normal file
BIN
corpus/0f4ecf072e9ae7a01ff27513e770363b0ba926ce
Normal file
Binary file not shown.
BIN
corpus/0fa39cd3837e6f0d85a67595933336b68f67248a
Normal file
BIN
corpus/0fa39cd3837e6f0d85a67595933336b68f67248a
Normal file
Binary file not shown.
BIN
corpus/0fc04cdbefc601dee20fbf5039669187497ab61e
Normal file
BIN
corpus/0fc04cdbefc601dee20fbf5039669187497ab61e
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
corpus/10e5d27ffe9630f39a1d4bbf81dfe0186734eebd
Normal file
BIN
corpus/10e5d27ffe9630f39a1d4bbf81dfe0186734eebd
Normal file
Binary file not shown.
BIN
corpus/11516b06b08b92cd3c5eb268fca2c0cb90e825da
Normal file
BIN
corpus/11516b06b08b92cd3c5eb268fca2c0cb90e825da
Normal file
Binary file not shown.
BIN
corpus/1171677231c97f3e153065a460c75176a4dc1efe
Normal file
BIN
corpus/1171677231c97f3e153065a460c75176a4dc1efe
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 11 B |
Binary file not shown.
Binary file not shown.
BIN
corpus/134de1b68774dbf7169eebc2b1256adf1f4ddf37
Normal file
BIN
corpus/134de1b68774dbf7169eebc2b1256adf1f4ddf37
Normal file
Binary file not shown.
BIN
corpus/1382d742e726802ad6507a0254ea296ed75b0150
Normal file
BIN
corpus/1382d742e726802ad6507a0254ea296ed75b0150
Normal file
Binary file not shown.
BIN
corpus/13a6bd032172db55ad35c19227c0a1e492dc7ed3
Normal file
BIN
corpus/13a6bd032172db55ad35c19227c0a1e492dc7ed3
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/14b2daeea15b6e7cfe4f28f695ace1cffd8bb6d7
Normal file
BIN
corpus/14b2daeea15b6e7cfe4f28f695ace1cffd8bb6d7
Normal file
Binary file not shown.
BIN
corpus/15023dd585a975308d45533e2876d8ca60e48162
Normal file
BIN
corpus/15023dd585a975308d45533e2876d8ca60e48162
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
corpus/15efe922dec96e9dc6860a3b5ce45d44a100fef6
Normal file
BIN
corpus/15efe922dec96e9dc6860a3b5ce45d44a100fef6
Normal file
Binary file not shown.
BIN
corpus/16fd756ed15f1437f143d7b3e8f100be25281649
Normal file
BIN
corpus/16fd756ed15f1437f143d7b3e8f100be25281649
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/1796920e2eaaef618eb2100d6db5ac980b9b20a9
Normal file
BIN
corpus/1796920e2eaaef618eb2100d6db5ac980b9b20a9
Normal file
Binary file not shown.
BIN
corpus/17d924f6a27697c66a3fc7ac002b58f78f3e992a
Normal file
BIN
corpus/17d924f6a27697c66a3fc7ac002b58f78f3e992a
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
corpus/1a314b8298de08b8988d0bb8b6b1935377c4419f
Normal file
BIN
corpus/1a314b8298de08b8988d0bb8b6b1935377c4419f
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/1aa0ac37b1c3e50dc0202951722ce494d0d069c1
Normal file
BIN
corpus/1aa0ac37b1c3e50dc0202951722ce494d0d069c1
Normal file
Binary file not shown.
BIN
corpus/1afad57db40839ad3aa9b9414fc4b3b71886edc8
Normal file
BIN
corpus/1afad57db40839ad3aa9b9414fc4b3b71886edc8
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
corpus/1b8be6892fe5c22d64283aab813b5bcaf8ad9e75
Normal file
BIN
corpus/1b8be6892fe5c22d64283aab813b5bcaf8ad9e75
Normal file
Binary file not shown.
BIN
corpus/1ba958676d3e09b4cb15e8792bd72b7707a0f9c2
Normal file
BIN
corpus/1ba958676d3e09b4cb15e8792bd72b7707a0f9c2
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/1bbe78e37c9747b7ccd095f78a4419f52e8bc1bf
Normal file
BIN
corpus/1bbe78e37c9747b7ccd095f78a4419f52e8bc1bf
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/1c1614a264e5453ce36fd9f6d42a0ae071c08846
Normal file
BIN
corpus/1c1614a264e5453ce36fd9f6d42a0ae071c08846
Normal file
Binary file not shown.
BIN
corpus/1cb0626d22445fb81a0d80d4c54cbe3b18f72c4f
Normal file
BIN
corpus/1cb0626d22445fb81a0d80d4c54cbe3b18f72c4f
Normal file
Binary file not shown.
BIN
corpus/1d3b21afa6d9f9cc613a4555501d6422f74b23d5
Normal file
BIN
corpus/1d3b21afa6d9f9cc613a4555501d6422f74b23d5
Normal file
Binary file not shown.
BIN
corpus/1dc2879a3704ee419af89db050328c4a07631ec8
Normal file
BIN
corpus/1dc2879a3704ee419af89db050328c4a07631ec8
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/1dfeee6660b5b0016a6e57135ad11d0e1c16857b
Normal file
BIN
corpus/1dfeee6660b5b0016a6e57135ad11d0e1c16857b
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/1edd234c122a4138ceec329ee719429aaaeb7997
Normal file
BIN
corpus/1edd234c122a4138ceec329ee719429aaaeb7997
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/20abddb7bc6dbd7fad96b6051841f4d0164ecade
Normal file
BIN
corpus/20abddb7bc6dbd7fad96b6051841f4d0164ecade
Normal file
Binary file not shown.
BIN
corpus/20b85f850510b18de432a5f2d6ea361e943ea073
Normal file
BIN
corpus/20b85f850510b18de432a5f2d6ea361e943ea073
Normal file
Binary file not shown.
BIN
corpus/20cfdb6e4aaf3ae7bfdbc53af64175b7e1da2647
Normal file
BIN
corpus/20cfdb6e4aaf3ae7bfdbc53af64175b7e1da2647
Normal file
Binary file not shown.
BIN
corpus/210c204006f12e92ed7d9f95f46484423bf691b1
Normal file
BIN
corpus/210c204006f12e92ed7d9f95f46484423bf691b1
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user