Hello Community,

I am an engineer from Amazon Product Search and we recently encountered
a WrongThreadException in our service when building TermStates with
Lucene9.6 and JDK19.02+9.


We are just using one thread when initializing term states. I am wondering
if any other users encounter this problem, is this a known bug/issue of
JDK19?


> java.lang.WrongThreadException: Attempted access outside owning thread
> java.lang.WrongThreadException: Attempted access outside owning thread
>     at
> java.base/jdk.internal.foreign.MemorySessionImpl.wrongThread(MemorySessionImpl.java:460)
>   at
> java.base/jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError.newRuntimeException(ScopedMemoryAccess.java:113)
>  at
> java.base/jdk.internal.misc.ScopedMemoryAccess.getByte(ScopedMemoryAccess.java:518)
>    at
> java.base/java.lang.invoke.VarHandleSegmentAsBytes.get(VarHandleSegmentAsBytes.java:109)
>   at
> java.base/java.lang.foreign.MemorySegment.get(MemorySegment.java:1103)
>     at
> org.apache.lucene.store.MemorySegmentIndexInput$SingleSegmentImpl.readByte(MemorySegmentIndexInput.java:485)
>   at
> org.apache.lucene.util.fst.ReverseRandomAccessReader.readByte(ReverseRandomAccessReader.java:33)
>   at org.apache.lucene.util.fst.FST.findTargetArc(FST.java:1444)
>    at
> org.apache.lucene.codecs.lucene90.blocktree.SegmentTermsEnum.seekExact(SegmentTermsEnum.java:511)
>  at org.apache.lucene.index.TermStates.loadTermsEnum(TermStates.java:111)
>  at org.apache.lucene.index.TermStates.build(TermStates.java:96)

Reply via email to