Radim Vansa created ISPN-4573:
---------------------------------
Summary: Unable to serialize List<LuceneWork>
Key: ISPN-4573
URL:
https://issues.jboss.org/browse/ISPN-4573
Project: Infinispan
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Embedded Querying
Affects Versions: 7.0.0.Alpha5
Reporter: Radim Vansa
Assignee: Sanne Grinovero
When I try to fill distributed cache with indexing enabled concurrently from multiple
threads, I get
{code}
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)
{code}
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.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)