-
Bug
-
Resolution: Done
-
Critical
-
7.0.0.Alpha5
-
None
When I try to fill distributed cache with indexing enabled concurrently from multiple threads, I get
org.hibernate.search.exception.SearchException: HSEARCH000083: Unable to serialize List<LuceneWork> at org.hibernate.search.indexes.serialization.impl.LuceneWorkSerializerImpl.toSerializedModel(LuceneWorkSerializerImpl.java:92) ... Caused by: java.lang.ArrayIndexOutOfBoundsException: 6 at java.util.ArrayList.add(ArrayList.java:412) at org.hibernate.search.indexes.serialization.avro.impl.AvroSerializer.addFieldWithStringData(AvroSerializer.java:258) at org.hibernate.search.indexes.serialization.impl.LuceneWorkSerializerImpl.buildDocument(LuceneWorkSerializerImpl.java:174) at org.hibernate.search.indexes.serialization.impl.LuceneWorkSerializerImpl.toSerializedModel(LuceneWorkSerializerImpl.java:80)
There are multiple different exceptions as cause, but the reason is one: AvroSerializer is not thead-safe. AvroSerializerProvider returns always the same instance, and so does InfinispanIndexManager (or rather DirectoryBasedIndexManager) return the same instance of LuceneWorkSerializerImpl wrapping the AvroSerializerProvider.
This results in failed writes, corrupted data and another fun.
- is blocked by
-
ISPN-4636 Upgrade to Hibernate Search 5.0.0.Alpha6
-
- Closed
-
- depends on
-
HSEARCH-1637 Loading...