[SHOAL-50] Expose MASTER_CHANGE_EVENT Created: 14/Apr/08  Updated: 25/Nov/10  Resolved: 23/Jun/10

Status: Resolved
Project: shoal
Component/s: GMS
Affects Version/s: current
Fix Version/s: milestone 1

Type: Improvement Priority: Major
Reporter: krijnschaap Assignee: carryel
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: All
Platform: All

Attachments: Java Archive File group_leader_notification_patch.jar     Java Archive File group_leader_notification_patch.jar    
Issue Links:
depends on SHOAL-61 when members join the group concurren... Open
Issuezilla Id: 50


Create a signal whenever the master for the cluster has changed. Either add a
promoted to master/demoted as master to the involved nodes, or a global signal
that just notifies all nodes of the new master, the second probably being the
most flexible solution.

Comment by shreedhar_ganapathy [ 24/Jun/08 ]

Reassigning the enhancement request to community member Bongjae

Comment by carryel [ 14/May/09 ]

This issue could be dependent on issue #61 because issue #61 could change
MASTER_CHANGE_EVENT's notification timiming.

But, anyway, I made the patch by which a user could be aware of

A user can receive GroupLeaderShipNotificationSignal when MASTER_CHANGE_EVENT
is occurred by adding GroupLeaderShipNotificationActionFactory to gms like this.

gms.addActionFactory( new GroupLeaderShipNotificationActionFactoryImpl(
callback ) );

I will attach the proposed patch, diff and test app.

Comment by carryel [ 14/May/09 ]

Created an attachment (id=16)
attched the patch and diff

Comment by carryel [ 17/May/09 ]

I received feedbacks from Joe and Shreedhar.

So I modified the proposed patch more.

Here are changes.

  • GroupLeaderShip ===> GroupLeadership
  • all member types as well as CORE can receive the group leadership event.
  • the log message is modified for debugging when a group leadership event is
  • GroupLeadershipNotificationSignal has the following API.
  • provides a list of the previous view's snapshot at time signal arrives.
  • @return List containing the list of <code>GMSMember</code>s which are
    corresponding to the view
    List<GMSMember> getPreviousView();


  • provides a list of the current view's snapshot at time signal arrives.
  • @return List containing the list of <code>GMSMember</code>s which are
    corresponding to the view
    List<GMSMember> getCurrentView();


  • provides a list of all live and current CORE designated members.
  • @return List containing the list of member token ids of core members
    List<String> getCurrentCoreMembers();


  • provides a list of all live members i.e. CORE and SPECTATOR members.
  • @return List containing the list of member token ids of all members
    List<String> getAllCurrentMembers();
Comment by carryel [ 17/May/09 ]

Created an attachment (id=17)
I attached the proposed patch and diff again

Comment by carryel [ 19/May/09 ]

I received feedback from Joe.

Joe wrote:
>A WATCHDOG is not allowed to be a GroupLeader and at this time I don't
envision it needing to know the master or of master change event.
>The WATCHDOG currently broacdcasts failure notification to all members of the
cluster so it does not assume it knows which instance is the Master.
>So lets not send groupleadership events to WATCHDOG

So recent patch should be modified more like this.

In ViewWindow.java

private void analyzeMasterChangeView(final EventPacket packet)

{ ... if( !getGMSContext().isWatchdog() ) addGroupLeadershipNotificationSignal( token, member.getGroupName(), member.getStartTime() ); }

Thanks to Joe.

Comment by Joe Fialli [ 18/Jun/09 ]

Proposed changes are being regression tested by Shoal QA test.

Comment by Joe Fialli [ 05/Feb/10 ]

Fix has been integrated in past.

Generated at Mon Mar 27 18:50:03 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.