-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: NotSerializableException when NumericField gets serialized
PostPosted: Tue Feb 08, 2011 7:47 am 
Newbie

Joined: Tue Feb 08, 2011 6:27 am
Posts: 2
We have a master-slave-architecture which delegates an index update to the master. When the slave tries to inform the master via JMSBackendQueueProcessor the object including a NumericField gets serialized. A NotSerializableException occurs on a NumericTokenStream. The NumericField extends AbstractField, which implements Serializable, but it cannot be serialized because it stores the precisionStep in the underlying NumericTokenStream, which is not serializable.


Top
 Profile  
 
 Post subject: Re: NotSerializableException when NumericField gets serialized
PostPosted: Tue Feb 08, 2011 8:14 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

thanks for that. Could you create a Jira issue - http://opensource.atlassian.com/project ... se/HSEARCH - and maybe even attach a testcase?
That would be much appreciated.

--Hardy


Top
 Profile  
 
 Post subject: Re: NotSerializableException when NumericField gets serialized
PostPosted: Tue Feb 08, 2011 10:16 am 
Newbie

Joined: Tue Feb 08, 2011 6:27 am
Posts: 2
I opened an Issue:
http://opensource.atlassian.com/project ... SEARCH-681


Top
 Profile  
 
 Post subject: Re: NotSerializableException when NumericField gets serialized
PostPosted: Tue Feb 08, 2011 10:27 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Thanks :)


Top
 Profile  
 
 Post subject: Re: NotSerializableException when NumericField gets serialized
PostPosted: Mon Mar 21, 2011 2:26 pm 
Newbie

Joined: Mon Mar 21, 2011 2:15 pm
Posts: 1
Is there any update on this issue?

It seems that because of this issue, master/slave replication is totally broken if you use NumericFields.

Is there any workaround?

Also, I'm curious to know what the plan is for Hibernate Search with regard to the fact that Lucene has removed all support for serialization in Lucene 4 (see: https://issues.apache.org/jira/browse/LUCENE-2908 ) and doesn't plan on fixing it in the 3.x branch (see: https://issues.apache.org/jira/browse/LUCENE-2707)

Since the master/slave architecture works by serializing Lucene Documents over the wire, it would seem that something needs to be changed.

Thanks,
Marc


Top
 Profile  
 
 Post subject: Re: NotSerializableException when NumericField gets serialized
PostPosted: Mon Mar 21, 2011 3:22 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi Marc,
yes definitely something needs to be changed. Currently, you have to avoid either master/slave backend or NumericFields.
You could try the Infinispan directory, which is a better fit in many other ways, but under heavy write load on multiple nodes this also needs a master/slave setup (if you only need failover and write to one at the same time you won't need it) to prevent long waits on locking (and Lucene's implementation of a "wait on" lock is very bad for this use case as there's no notification, only polling).

We're going to abstract the Document from the wire, if you really need a workaround now you can write your own backend and plug it in, you only have to implement
org.hibernate.search.backend.BackendQueueProcessorFactory
(you could have a look into org.hibernate.search.backend.impl.blackhole.BlackHoleBackendQueueProcessorFactory for a skeleton implementation)
and write some code which reads the Document, "serializes it" in some custom way, and then on the JMS client you deserialize it again before feeding it in Search again.

a patch would be appreciated.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.