fdb-record-layer icon indicating copy to clipboard operation
fdb-record-layer copied to clipboard

LuceneOptimizedStoredFieldsFormatTest > testNumericField cannot find stored fields sometimes

Open ScottDugas opened this issue 1 year ago • 2 comments

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)

ScottDugas avatar Jul 08 '24 14:07 ScottDugas

To be clear, I have tested locally, and this test passes with that seed, so there is something non-deterministic about the test.

ScottDugas avatar Aug 19 '24 14:08 ScottDugas

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.

ScottDugas avatar Aug 19 '24 15:08 ScottDugas