fdb-record-layer
fdb-record-layer copied to clipboard
LuceneOptimizedStoredFieldsFormatTest > testNumericField cannot find stored fields sometimes
This happens sometimes (with the same seed):
LuceneOptimizedStoredFieldsFormatTest > testNumericField FAILED
com.apple.foundationdb.record.RecordCoreStorageException: Could not find stored fields
at __randomizedtesting.SeedInfo.seed([C185081D42F0F43C:91AB1306856D114E]:0)
at app//com.apple.foundationdb.record.lucene.directory.FDBDirectory.readStoredFields(FDBDirectory.java:539)
at app//com.apple.foundationdb.record.lucene.codec.LuceneOptimizedStoredFieldsReader.visitDocument(LuceneOptimizedStoredFieldsReader.java:76)
at app//org.apache.lucene.index.CodecReader.document(CodecReader.java:84)
at app//org.apache.lucene.index.IndexReader.document(IndexReader.java:352)
at app//org.apache.lucene.index.BaseStoredFieldsFormatTestCase.testNumericField(BaseStoredFieldsFormatTestCase.java:297)
at app//com.apple.foundationdb.record.lucene.codec.LuceneOptimizedStoredFieldsFormatTest.testNumericField(LuceneOptimizedStoredFieldsFormatTest.java:88)
To be clear, I have tested locally, and this test passes with that seed, so there is something non-deterministic about the test.
I did reproduce this locally by adding a custom MethodRule that repeated the test a bunch of times.
It looks like sometimes it closes the writer and merges the files, and later tries to read the files. I'm not sure why it is inconsistently deleting the files.