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

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

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

    https://github.com/apache/trafodion/pull/1664#discussion_r205931226
  
    --- Diff: core/sqf/monitor/linux/process.cxx ---
    @@ -4775,46 +4818,85 @@ void CProcessContainer::Bcast (struct message_def 
*msg)
     
     char *CProcessContainer::BuildOurName( int nid, int pid, char *name )
     {
    -    int i;
    -    int rem;
    -    int cnt[4];
    -
         const char method_name[] = "CProcessContainer::BuildOurName";
         TRACE_ENTRY;
     
    -    // Convert Pid into base 35 acsii
    -    cnt[0] = pid / 42875;
    -    rem = pid - ( cnt[0] * 42875 );
    -    cnt[1] = rem / 1225;
    -    rem -= ( cnt[1] * 1225 );
    -    cnt[2] = rem / 35;
    -    rem -= ( cnt[2] * 35 );
    -    cnt[3] = rem;
    +    int i;
    +    int rem;
    +    int cnt[6];
    +
    +    if (!processNameFormatLong_)
    +    {
    +        // Convert Pid into base 35 acsii
    +        cnt[0] = pid / 42875;    // (35 * 35 * 35)
    +        rem = pid - ( cnt[0] * 42875 );
    +        cnt[1] = rem / 1225;     // (35 * 35)
    +        rem -= ( cnt[1] * 1225 );
    +        cnt[2] = rem / 35;
    +        rem -= ( cnt[2] * 35 );
    +        cnt[3] = rem;
    +    
    +        // Process name format long: '$Zxxpppp' xx = nid, pppp = pid
     
    -    // Convert Nid into base 16 acsii
    -    sprintf(name,"$Z%2.2X",nid);
    -    for(i=3; i>=0; i--)
    -    {
    -        if( cnt[i] < 10 )
    -        {
    -            name[i+4] = '0'+cnt[i];
    -        }
    -        else
    +        // Convert Nid into base 16 acsii
    +        sprintf(name,"$Z%2.2X",nid);
    +
    +        // Convert Pid into base 36 ascii
    +        for(i=3; i>=0; i--)
             {
    -            cnt[i] -= 10;
    -            // we are skipping cap 'o' because it looks like zero.
    -            if( cnt[i] >= 14 )
    +            if( cnt[i] < 10 )
                 {
    -                name[i+4] = 'P'+(cnt[i]-14);
    +                name[i+4] = '0'+cnt[i];
                 }
                 else
                 {
    -                name[i+4] = 'A'+cnt[i];
    +                cnt[i] -= 10;
    +                // we are skipping cap 'o' because it looks like zero.
    +                if( cnt[i] >= 14 )
    +                {
    +                    name[i+4] = 'P'+(cnt[i]-14);
    +                }
    +                else
    +                {
    +                    name[i+4] = 'A'+cnt[i];
    +                }
                 }
             }
    +        name[8] = '\0';
    +    }
    +    else
    +    {
    +        // We are skipping 'A', 'I', 'O', and 'U' to distinguish between 
zero
    +        // and one digits, and for political correctness in generated names
    --- End diff --
    
    We could get closer to the workarounds that teenagers use:  V for U, zero 
for O.  That gives you a few more.  But for me, this seems good enough to start 
with.


> Trafodion Foundation Scalability Enhancements
> ---------------------------------------------
>
>                 Key: TRAFODION-2884
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2884
>             Project: Apache Trafodion
>          Issue Type: Improvement
>          Components: dtm, foundation, installer
>    Affects Versions: 2.3
>            Reporter: Gonzalo E Correa
>            Assignee: Gonzalo E Correa
>            Priority: Major
>             Fix For: 2.3
>
>         Attachments: 
> TRAFODION-2884-Scalable_Name_Space-Architecure-review.v2.2.pdf, 
> TRAFODION-2884-Scalable_Name_Space-Architecure.v1.0.pdf, 
> TRAFODION-2884-Scalable_Name_Space-Architecure.v1.1.pdf, 
> TRAFODION-2884-Scalable_Name_Space-Architecure.v2.0.pdf, 
> TRAFODION-2884-Scalable_Name_Space-Architecure.v2.1.pdf, 
> TRAFODION-2884-Scalable_Name_Space-Architecure.v2.2.pdf, 
> TRAFODION-2884-Scalable_Name_Space-DesignNotes-review.v1.0.pdf, 
> TRAFODION-2884-Scalable_Name_Space-DesignNotes.v0.1.pdf, 
> TRAFODION-2884-Scalable_Name_Space-DesignNotes.v1.0.pdf, 
> TRAFODION-2884-Scalable_Name_Space-Overview-20180308.pptx
>
>
> Architectural changes are needed in the Trafodion Foundation components to 
> effectively scale above 256 servers.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to