[
https://issues.apache.org/jira/browse/TS-4744?focusedWorklogId=27369&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-27369
]
ASF GitHub Bot logged work on TS-4744:
--------------------------------------
Author: ASF GitHub Bot
Created on: 29/Aug/16 20:17
Start Date: 29/Aug/16 20:17
Worklog Time Spent: 10m
Work Description: GitHub user jrushford opened a pull request:
https://github.com/apache/trafficserver/pull/939
TS-4744: ParentConsistentHash::selectParent may select the unavailable
parent.
I've created this pull request on behalf of @keith2008 who found the issue
and opened the JIRA. His pull request had merge conflicts and he has asked me
to resolve them and submit this new PR for TS-4744.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jrushford/trafficserver TS-4744
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafficserver/pull/939.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 #939
----
commit 1112b6c958669815fcd8c78e49d060b2664f815d
Author: John J. Rushford <[email protected]>
Date: 2016-08-29T20:07:23Z
TS-4744: ParentConsistentHash::selectParent may select the unavailable
parent.
----
Issue Time Tracking
-------------------
Worklog Id: (was: 27369)
Time Spent: 50m (was: 40m)
> 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: 50m
> 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)