LUCENE-10165: Fix test failures.

This commit is contained in:
Adrien Grand 2021-10-21 11:32:10 +02:00
parent 9e84b2fd41
commit 8b6c90eccd
1 changed files with 2 additions and 2 deletions

View File

@ -127,8 +127,8 @@ public class DirectReader {
private void fillBuffer(long index) throws IOException { private void fillBuffer(long index) throws IOException {
// NOTE: we're not allowed to read more than 3 bytes past the last value // NOTE: we're not allowed to read more than 3 bytes past the last value
if (index > numValues - MERGE_BUFFER_SIZE) { if (index >= numValues - MERGE_BUFFER_SIZE) {
// Less than 128 values left // 128 values left or less
final LongValues slowInstance = getInstance(slice, bitsPerValue, baseOffset); final LongValues slowInstance = getInstance(slice, bitsPerValue, baseOffset);
final int numValuesLastBlock = Math.toIntExact(numValues - index); final int numValuesLastBlock = Math.toIntExact(numValues - index);
for (int i = 0; i < numValuesLastBlock; ++i) { for (int i = 0; i < numValuesLastBlock; ++i) {