VivekKumarNeu commented on PR #15233:
URL: https://github.com/apache/lucene/pull/15233#issuecomment-3349845036

   Hi @msokolov ,
   
   You are correct. Due to the lack of an index, the test fails. I tried 
testing the scenario you mentioned, added `writer.commit()` under the `try 
(DirectoryReader reader = 
maybeWrapWithMergingReader(DirectoryReader.open(dir))) {` , but it fails with 
the same error. I also tried adding the writer.commit() just after creating the 
writer (RandomIndexWriter writer = new RandomIndexWriter(random(), dir, 
conf);), and that condition works and we do not see any test failure. 
   
   I believe this condition:
   `if (random().nextInt(31) == 0) { writer.commit(); }`
   will only work for a specific time. If this is not true, we are without an 
index, and this error occurs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to