Bug 1122951

Summary: [GSS] (6.4.0) ElectionPolicy is called twice during cluster change/merge (race condition)
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: wfink
Component: ClusteringAssignee: Paul Ferraro <paul.ferraro>
Status: CLOSED CURRENTRELEASE QA Contact: Jitka Kozana <jkudrnac>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: jawilson, jdoyle, kkhan, lthon, rhusar
Target Milestone: DR1   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1133758 1133828 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 1133758, 1133828    

Description wfink 2014-07-24 13:09:03 UTC
Description of problem:
If a cluster need to elect the master node it might happen that the ElectionPolicy is called multiple times by different threads.

13:40:13,832 INFO  [org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.CustomElectionPolicy] (notification-thread-0) CustomElectionPolicy.Elect(). Candidates Size: 1
13:40:13,865 INFO  [org.jboss.as.quickstarts.cluster.hasingleton.service.ejb.CustomElectionPolicy] (AsynchViewChangeHandler Thread) CustomElectionPolicy.Elect(). Candidates Size: 2

This might happen if one server was shutdown or after split/heal the cluster. It might happen that the singleton was not correct deactivated on one node and keep running twice.

Comment 1 wfink 2014-07-24 13:11:21 UTC
From the analysis it will be a race between JGroups view change event and Infinispan cacheModifiedEvent.

Comment 4 Ladislav Thon 2014-11-05 09:02:37 UTC
Verified with EAP 6.4.0.DR8.