Bugfix for rare bug where some queries may miss hits due to BTreeReader's retain function giving up too fast.

This commit is contained in:
Viktor Lofgren 2022-11-22 16:33:29 +01:00
parent baaf21911a
commit c057ce74a8

View File

@ -52,7 +52,9 @@ public class BTreeReader {
public void retainEntries(BTreeQueryBuffer buffer) {
if (header.layers() == 0) {
BTreePointer pointer = new BTreePointer(header);
pointer.retainData(buffer);
while (buffer.hasMore()) {
pointer.retainData(buffer);
}
}
retainSingle(buffer);
}
@ -61,7 +63,9 @@ public class BTreeReader {
public void rejectEntries(BTreeQueryBuffer buffer) {
if (header.layers() == 0) {
BTreePointer pointer = new BTreePointer(header);
pointer.rejectData(buffer);
while (buffer.hasMore()) {
pointer.rejectData(buffer);
}
}
rejectSingle(buffer);
}