I face some challenge when introduce hibernate search within our jboss clusters, hope to get some advice.
Our system has two cluster, one is kind of provisioning cluster with two nodes, all the data changes are towards this cluster, so call provision cluster. Then there is another cluster handles google like search request based on hibernate search, no data update operation should be done in this cluster, so call traffic cluster which could have 2~n nodes.
To get both high availability and scalability, i intent to use master/slave mode in hibernate search. Since there is no hard drive available on traffic cluster (of douse NFT is available, but i don't think it is a good choice to store index), so i intent to use infinispan as index directory provider, backend can be either JMS or jgroups.
My problem is master node(s). i want to choice either whole traffic cluster or whole provisioning cluster as master to update index. It seems you can't config more than once node as master with hibernate search today (no matter JMS or jgroups backend), otherwise it throws "org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: org.infinispan.lucene.locking.BaseLuceneLock" exception. As i understood, the first master node keeps the lock when opens index writer, so the rest of node(s) in the cluster get such exception. i don't want to differentiate nodes in the same cluster (i.e only config one as master), this could cause single point of failure. So I wonder if there is any way to auto elect the master in a cluster and re-elect in the cluster if the previous master node crashed.
I see there is some experiment feature in hibernate-search 4.3 for auto election if uses jgroups backend, but we are a commercial product, so i am afraid of such experiment feature.
Thank you for your advice.