Update maxVersion to max(maxVersion, writeVersion)
This commit is contained in:
@@ -1151,7 +1151,7 @@ Iterator lastLeq(Node *n, const std::span<const uint8_t> key) {
|
|||||||
void insert(Node **self_, std::span<const uint8_t> key, int64_t writeVersion) {
|
void insert(Node **self_, std::span<const uint8_t> key, int64_t writeVersion) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
auto &self = *self_;
|
auto &self = *self_;
|
||||||
self->maxVersion = writeVersion;
|
self->maxVersion = std::max(self->maxVersion, writeVersion);
|
||||||
if (key.size() == 0) {
|
if (key.size() == 0) {
|
||||||
auto l = lastLeq(self, key);
|
auto l = lastLeq(self, key);
|
||||||
self->entryPresent = true;
|
self->entryPresent = true;
|
||||||
|
Reference in New Issue
Block a user