benwtrent commented on PR #13475:
URL: https://github.com/apache/lucene/pull/13475#issuecomment-2158343032
Here is an example of an assertion tripping:
```
java.lang.AssertionError: DocValuesProducer are only supposed to be consumed
in the thread in which they have been acquired. But was acquired in
Thread[#12828,Lucene Merge Thread #6109,5,TGRP-TestAssertingDocValuesFormat]
and consumed in
Thread[#12830,pool-1-thread-2,5,TGRP-TestAssertingDocValuesFormat].
at
org.apache.lucene.tests.codecs.asserting.AssertingCodec.assertThread(AssertingCodec.java:44)
at
org.apache.lucene.tests.codecs.asserting.AssertingDocValuesFormat$AssertingDocValuesProducer.getNumeric(AssertingDocValuesFormat.java:232)
at
org.apache.lucene.codecs.perfield.PerFieldDocValuesFormat$FieldsReader.getNumeric(PerFieldDocValuesFormat.java:323)
at
org.apache.lucene.codecs.DocValuesConsumer$1.getNumeric(DocValuesConsumer.java:201)
at
org.apache.lucene.tests.codecs.asserting.AssertingDocValuesFormat$AssertingDocValuesConsumer.addNumericField(AssertingDocValuesFormat.java:76)
at
org.apache.lucene.codecs.DocValuesConsumer.mergeNumericField(DocValuesConsumer.java:183)
at
org.apache.lucene.codecs.DocValuesConsumer.merge(DocValuesConsumer.java:142)
at
org.apache.lucene.codecs.perfield.PerFieldDocValuesFormat$FieldsWriter.merge(PerFieldDocValuesFormat.java:152)
at
org.apache.lucene.index.SegmentMerger.mergeDocValues(SegmentMerger.java:205)
at
org.apache.lucene.index.SegmentMerger.mergeWithLogging(SegmentMerger.java:325)
at
org.apache.lucene.index.SegmentMerger.lambda$merge$1(SegmentMerger.java:155)
at
org.apache.lucene.search.TaskExecutor$TaskGroup.lambda$createTask$0(TaskExecutor.java:117)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at
org.apache.lucene.index.ConcurrentMergeScheduler$CachedExecutor.lambda$execute$0(ConcurrentMergeScheduler.java:982)
```
It seems to me that maybe we want to adjust the assertion? Maybe set
`currentThread` to the first viewed thread when the values are read and assert
that its always the same?
--
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]