Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: GMS
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      50

      Description

      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.

        Issue Links

          Activity

          Hide
          shreedhar_ganapathy added a comment -

          Reassigning the enhancement request to community member Bongjae

          Show
          shreedhar_ganapathy added a comment - Reassigning the enhancement request to community member Bongjae
          Hide
          carryel added a comment -

          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
          MASTER_CHANGE_EVENT.

          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.

          Show
          carryel added a comment - 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 MASTER_CHANGE_EVENT. 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.
          Hide
          carryel added a comment -

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

          Show
          carryel added a comment - Created an attachment (id=16) attched the patch and diff
          Hide
          carryel added a comment -

          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
            fired.
          • 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();
          Show
          carryel added a comment - 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 fired. 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();
          Hide
          carryel added a comment -

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

          Show
          carryel added a comment - Created an attachment (id=17) I attached the proposed patch and diff again
          Hide
          carryel added a comment -

          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.

          Show
          carryel added a comment - 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.
          Hide
          Joe Fialli added a comment -

          Proposed changes are being regression tested by Shoal QA test.

          Show
          Joe Fialli added a comment - Proposed changes are being regression tested by Shoal QA test.
          Hide
          Joe Fialli added a comment -

          Fix has been integrated in past.

          Show
          Joe Fialli added a comment - Fix has been integrated in past.

            People

            • Assignee:
              carryel
              Reporter:
              krijnschaap
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: