A few fixes/tests

This commit is contained in:
Francesco Mazzoli
2023-03-08 20:59:11 +00:00
parent a295c0cb71
commit d0100550ca
12 changed files with 357 additions and 165 deletions

View File

@@ -732,7 +732,8 @@ struct ShardDBImpl {
break;
}
auto value = ExternalValue<SpanBody>::FromSlice(it->value());
if (key().offset()+value().size() < req.byteOffset) { // can only happens if the first cursor is out of bounds
if (key().offset()+value().spanSize() < req.byteOffset) { // can only happens if the first cursor is out of bounds
LOG_DEBUG(_env, "exiting early from spans since current key starts at %s and ends at %s, which is less than offset %s", key().offset(), key().offset()+value().spanSize(), req.byteOffset);
break;
}
auto& respSpan = resp.spans.els.emplace_back();