[ 
https://issues.apache.org/jira/browse/TRAFODION-1885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15198056#comment-15198056
 ] 

ASF GitHub Bot commented on TRAFODION-1885:
-------------------------------------------

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

    https://github.com/apache/incubator-trafodion/pull/385#discussion_r56405697
  
    --- Diff: core/sqf/monitor/linux/shell.cxx ---
    @@ -3069,6 +3072,103 @@ const char *zone_type_string( ZoneType type )
         return( str );
     }
     
    +void changeNodeName (char *current_name, char *new_name)
    +{
    +  
    +    if ((current_name == NULL) || (new_name == NULL))
    +    {
    +         printf( "[%s] Error: Invalid node name while attempting to change 
node name.\n", MyName );           
    +         return;
    +    }
    +    int count;
    +    MPI_Status status;
    +    CPhysicalNode  *physicalNode;
    +    PhysicalNodeNameMap_t::iterator it;
    +    pair<PhysicalNodeNameMap_t::iterator, bool> pnmit;
    +
    +    // Look up name
    +    it = PhysicalNodeMap.find( current_name );
    +
    +    if (it != PhysicalNodeMap.end())
    +    {
    +        physicalNode = it->second;
    +        if (physicalNode)
    +        {
    +           CPhysicalNode  *newPhysicalNode = new CPhysicalNode( new_name, 
physicalNode->GetState() );
    +           if (newPhysicalNode == NULL)
    +          {
    +               printf( "[%s] Error: Internal error with configuration 
while changing node name.\n", MyName );           
    +              return;
    +           }
    +           //remove and read
    +           PhysicalNodeMap.erase(current_name);
    +           pnmit = PhysicalNodeMap.insert( 
PhysicalNodeNameMap_t::value_type 
    +                                            ( newPhysicalNode->GetName(), 
newPhysicalNode ));
    +           if (pnmit.second == false)
    +           {   // Already had an entry with the given key value.  
    +                printf( "[%s] Error: Internal error while changing node 
name. Node name exists, node name=%s\n", MyName, new_name );
    +                return;
    --- End diff --
    
    Should we do a delete on newPhysicalNode in this code path? (Will it leak?)


> Online node expansion
> ---------------------
>
>                 Key: TRAFODION-1885
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1885
>             Project: Apache Trafodion
>          Issue Type: Improvement
>          Components: foundation
>            Reporter: Trina Krug
>            Assignee: Trina Krug
>
> Need the ability to add nodes without an outage.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to