Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1457#discussion_r171325354
  
    --- Diff: core/sqf/monitor/linux/cluster.cxx ---
    @@ -352,6 +358,131 @@ void CCluster::NodeReady( CNode *spareNode )
         TRACE_EXIT;
     }
     
    +// Assign leaders as required
    +// Current leaders are TM Leader and Monitor Leader
    +void CCluster::AssignLeaders( int pnid, bool checkProcess )
    +{
    +    const char method_name[] = "CCluster::AssignLeaders";
    +    TRACE_ENTRY;
    +    
    +    AssignTmLeader ( pnid, checkProcess );
    +    AssignMonitorLeader ( pnid );
    +    
    +    TRACE_EXIT;
    +}
    +
    +// Assign montior lead in the case of failure
    +void CCluster::AssignMonitorLeader( int pnid )
    +{
    +    const char method_name[] = "CCluster::AssignMonitorLeader";
    +    TRACE_ENTRY;
    +     
    +    int i = 0;
    +    int rc = 0;
    +    
    +    int lMonitorLeaderPNid = MonitorLeaderPNid;
    +    CNode *node = NULL;
    +
    +    if (MonitorLeaderPNid != pnid) 
    +    {
    +        if (trace_settings & (TRACE_INIT | TRACE_RECOVERY | TRACE_REQUEST 
| TRACE_SYNC | TRACE_TMSYNC))
    +        {
    +            trace_printf( "%s@%d" " - (MasterMonitor) returning, pnid %d 
!= monitorLead %d\n"
    +                        , method_name, __LINE__, pnid, MonitorLeaderPNid );
    +        }
    +         return;
    --- End diff --
    
    Should there be a TRACE_EXIT before this return?


---

Reply via email to