Re: LeaderElection bugfix

2012-06-27 Thread Sami Siren
ok, I see what you mean. Looks to me that you're right. I am not too familiar with the LeaderElector so I'll let Mark take a second look. -- Sami Siren On Wed, Jun 27, 2012 at 11:32 AM, "Trym R. Møller" wrote: > Hi Sami > > Regarding 2) A "simple" way to inspect the number of watchers, is to a

Re: LeaderElection bugfix

2012-06-27 Thread Trym R. Møller
Hi Sami Regarding 2) A "simple" way to inspect the number of watchers, is to add an error log statement to the process method of the watcher public void process(WatchedEvent event) { log.error(seq + " watcher received event: " + event); and see that the number of l

Re: LeaderElection bugfix

2012-06-27 Thread Trym R. Møller
Hi Sami Thanks for your rapid reply. Regarding 1) This seems to be time dependent but it is seen on my local windows running the unit test and on a linux server running Solr. Regarding 2) The test does not show the number of Watchers are increasing, but this can be observed either by dumping t

Re: LeaderElection bugfix

2012-06-27 Thread Sami Siren
On Wed, Jun 27, 2012 at 10:32 AM, "Trym R. Møller" wrote: > Hi Hi, > The behaviour of this can be verified using the below test in the > org.apache.solr.cloud.LeaderElectionIntegrationTest Can you reproduce the failure in your test every time or just rarely? I added the test method to LeaderEle

LeaderElection bugfix

2012-06-27 Thread Trym R. Møller
Hi In Solr Cloud when a Solr looses its ZooKeeper connection e.g. because of a session timeout the LeaderElector ZooKeeper Watchers handling its replica slices are notified with two events: a Disconnected and a SyncConnected event. Currently the org.apache.solr.cloud.LeaderElector#checkIfIamLe

LeaderElection

2012-06-21 Thread Trym R. Møller
Hi Messing with behaviour when Solr looses its ZooKeeper connection I'm trying to reproduce how a replica slice gets leader. I have made the below unit test in the LeaderElectionTest class which fails. I don't know if this simulates how Solr uses the LeaderElection class but please