From 90e4c44b996a621a28d08fb4af1c184f4a2708d7 Mon Sep 17 00:00:00 2001 From: Mikhail Khludnev Date: Tue, 27 Feb 2024 12:09:35 +0300 Subject: [PATCH] Log MockRandomMergePolicy reverse in verbose. (#13117) --- .../org/apache/lucene/tests/index/MockRandomMergePolicy.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lucene/test-framework/src/java/org/apache/lucene/tests/index/MockRandomMergePolicy.java b/lucene/test-framework/src/java/org/apache/lucene/tests/index/MockRandomMergePolicy.java index 19a74ceed8d..8b0370dfb93 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/tests/index/MockRandomMergePolicy.java +++ b/lucene/test-framework/src/java/org/apache/lucene/tests/index/MockRandomMergePolicy.java @@ -241,6 +241,9 @@ public class MockRandomMergePolicy extends MergePolicy { @Override public Sorter.DocMap reorder(CodecReader reader, Directory dir) throws IOException { if (r.nextBoolean()) { + if (LuceneTestCase.VERBOSE) { + System.out.println("NOTE: MockRandomMergePolicy now reverses reader=" + reader); + } // Reverse the doc ID order final int maxDoc = reader.maxDoc(); return new Sorter.DocMap() {