[
https://issues.apache.org/jira/browse/TS-4744?focusedWorklogId=26853&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-26853
]
ASF GitHub Bot logged work on TS-4744:
--------------------------------------
Author: ASF GitHub Bot
Created on: 23/Aug/16 00:53
Start Date: 23/Aug/16 00:53
Worklog Time Spent: 10m
Work Description: GitHub user keith2008 opened a pull request:
https://github.com/apache/trafficserver/pull/900
TS-4744: ParentConsistentHash::selectParent may select the unavailable
parent
ParentConsistentHash::selectParent may select the unavailable parent
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/keith2008/trafficserver TS-4744
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafficserver/pull/900.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #900
----
commit 8a76d21f5194cb31e514860319b8fcae2d2648be
Author: keith2008 <[email protected]>
Date: 2016-08-23T00:42:30Z
TS-4743: parent use consistent_hash Strategy may cause crash while first
parent is not set
commit 3deb52397b047455ba8aba3e5132e3daafa980ad
Author: keith2008 <[email protected]>
Date: 2016-08-23T00:51:44Z
TS-4744: ParentConsistentHash::selectParent may select the unavailable
parent
----
Issue Time Tracking
-------------------
Worklog Id: (was: 26853)
Time Spent: 10m
Remaining Estimate: 0h
> 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: 10m
> 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)