Skip to content

Commit a03edba

Browse files
committed
LUCENE-15108 commit writer before opening DirectoryReader to fix test
1 parent e706267 commit a03edba

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lucene/CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ Bug Fixes
9191
* GITHUB#14847: Allow Faiss vector format to index >2GB of vectors per-field per-segment by using MemorySegment APIs
9292
(instead of ByteBuffer) to copy bytes to native memory. (Kaival Parikh)
9393

94+
* GITHUB#15108: Fixed test failure caused by DirectoryReader.open() reading an index with uncommitted changes. (Vivek Kumar)
95+
9496
* GITHUB#15213: Don't normalize centroids with zero samples, which caused divide-by-zero. (Mike Sokolov)
9597

9698
Changes in Runtime Behavior

lucene/test-framework/src/java/org/apache/lucene/tests/index/LegacyBaseDocValuesFormatTestCase.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,6 +1544,8 @@ private void doTestSortedNumericsVsStoredFields(LongSupplier counts, LongSupplie
15441544
int id = random().nextInt(numDocs);
15451545
writer.deleteDocuments(new Term("id", Integer.toString(id)));
15461546
}
1547+
1548+
writer.commit();
15471549
try (DirectoryReader reader = maybeWrapWithMergingReader(DirectoryReader.open(dir))) {
15481550
TestUtil.checkReader(reader);
15491551
compareStoredFieldWithSortedNumericsDV(reader, "stored", "dv");

0 commit comments

Comments
 (0)