maskit commented on code in PR #12567:
URL: https://github.com/apache/trafficserver/pull/12567#discussion_r2457423491
##########
src/proxy/http/remap/NextHopConsistentHash.cc:
##########
@@ -57,17 +57,23 @@ std::shared_ptr<HostRecord>
NextHopConsistentHash::chashLookup(const std::shared_ptr<ATSConsistentHash>
&ring, uint32_t cur_ring, ParentResult &result,
HttpRequestData &request_info, bool
*wrapped, uint64_t sm_id)
{
- uint64_t hash_key = 0;
- ATSHash64Sip24 hash;
+ uint64_t hash_key = 0;
+ // Create hash instance based on configured algorithm and seeds
+ std::unique_ptr<ATSHash64> hash;
+ if (hash_algorithm == "siphash13") {
Review Comment:
Looks like it's almost a duplicate of
`ParentConsistentHash::createHashInstance`. Can we have just one place to do
this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]