[
https://issues.apache.org/jira/browse/TS-4707?focusedWorklogId=28625&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-28625
]
ASF GitHub Bot logged work on TS-4707:
--------------------------------------
Author: ASF GitHub Bot
Created on: 09/Sep/16 17:09
Start Date: 09/Sep/16 17:09
Worklog Time Spent: 10m
Work Description: Github user PSUdaemon commented on a diff in the pull
request:
https://github.com/apache/trafficserver/pull/834#discussion_r78214876
--- Diff: proxy/ParentConsistentHash.cc ---
@@ -58,29 +61,131 @@ ParentConsistentHash::~ParentConsistentHash()
delete chash[SECONDARY];
}
+void
+ParentConsistentHash::getPathHash_Helper(char *buffer, int size, const
char *tmp, int len)
+{
+ int slen;
+ int max = size - 1;
+ slen = (len > max) ? max : len;
+ strncpy(buffer, tmp, slen);
+ buffer[slen] = 0;
+}
--- End diff --
This should be a static function and not a class method IMO.
Also, I was somehow commenting on an old diff, but you should use the
`MIN()` macro here too.
Issue Time Tracking
-------------------
Worklog Id: (was: 28625)
Time Spent: 5h 20m (was: 5h 10m)
> Parent Consistent Hash Selection - add fname and maxdirs options.
> -----------------------------------------------------------------
>
> Key: TS-4707
> URL: https://issues.apache.org/jira/browse/TS-4707
> Project: Traffic Server
> Issue Type: Improvement
> Components: Parent Proxy
> Reporter: Peter Chou
> Assignee: Peter Chou
> Fix For: 7.0.0
>
> Time Spent: 5h 20m
> Remaining Estimate: 0h
>
> This enhancement adds two options, "fname" and "maxdirs", which can be used
> to exclude the file-name and some of the directories in the path. The
> remaining portions of the path are then used as part of the hash computation
> for selecting among multiple parent caches.
> For our usage, it was desirable from an operational perspective to direct all
> components of particular sub-tree to a single parent cache (to simplify
> trouble-shooting, pre-loading, etc.). This can be achieved by excluding the
> query-string, file-name, and right-most portions of the path from the hash
> computation.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)