Skip to content

Commit

Permalink
Disable CFS in TestDefaultCodecParallelizesIO. (#13875)
Browse files Browse the repository at this point in the history
`SerialIODirectory` doesn't count reads to files that are open with
`ReadAdvice#RANDOM_PRELOAD` as these files are expected to be loaded in memory.
Unfortunately, we cannot detect such files on compound segments, so this test
now disables compound segments.

Closes #13854
  • Loading branch information
jpountz authored Oct 9, 2024
1 parent a103ab8 commit 396b7b1
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ public static void beforeClass() throws Exception {
Directory bbDir = new ByteBuffersDirectory();
try (LineFileDocs docs = new LineFileDocs(random());
IndexWriter w =
new IndexWriter(bbDir, new IndexWriterConfig().setCodec(TestUtil.getDefaultCodec()))) {
new IndexWriter(
bbDir,
new IndexWriterConfig()
// Disable CFS, this test needs to know about files that are open with the
// RANDOM_PRELOAD advice, which CFS doesn't allow us to detect.
.setUseCompoundFile(false)
.setMergePolicy(newLogMergePolicy(false))
.setCodec(TestUtil.getDefaultCodec()))) {
final int numDocs = atLeast(10_000);
for (int d = 0; d < numDocs; ++d) {
Document doc = docs.nextDoc();
Expand Down

0 comments on commit 396b7b1

Please sign in to comment.