You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "John Rushford (JIRA)" <ji...@apache.org> on 2016/08/31 14:29:20 UTC

[jira] [Resolved] (TS-4744) ParentConsistentHash::selectParent may select the unavailable parent

     [ https://issues.apache.org/jira/browse/TS-4744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Rushford resolved TS-4744.
-------------------------------
    Resolution: Fixed

patch was merged.

> ParentConsistentHash::selectParent may select the unavailable parent
> --------------------------------------------------------------------
>
>                 Key: TS-4744
>                 URL: https://issues.apache.org/jira/browse/TS-4744
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Parent Proxy
>            Reporter: xiangdong chen
>            Assignee: John Rushford
>             Fix For: 7.0.0
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> code :ParentConsistentHash.cc,begin at line 141  
> do { // search until we've selected a different parent.
>         prtmp = (pRecord *)fhash->lookup(NULL, &result->chashIter[last_lookup], &wrap_around[last_lookup], &hash);
>         if (prtmp) {
>           pRec = (parents[last_lookup] + prtmp->idx);
>         }
>       } while (prtmp && strcmp(prtmp->hostname, result->hostname) == 0);
> fix it like this:
>         if (prtmp)
>           pRec = (parents[last_lookup] + prtmp->idx);
>         else  //begin of added xdchen, line:143
>           pRec = NULL; //endof of added by xdchen  
>  if (prtmp) {
>           pRec = (parents[last_lookup] + prtmp->idx);
>           Debug("parent_select", "Selected a new parent: %s.", pRec->hostname);
>         }
>         else  //begin of added xdchen, line:188
>           pRec = NULL; ////end of added xdchen
>  
>       }



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