FrankChen021 commented on code in PR #16757:
URL: https://github.com/apache/druid/pull/16757#discussion_r1713122300


##########
server/src/main/java/org/apache/druid/client/cache/MemcachedCache.java:
##########
@@ -641,14 +641,14 @@ public void close()
 
   public static final int MAX_PREFIX_LENGTH =
       MemcachedClientIF.MAX_KEY_LENGTH
-      - 40 // length of namespace hash
-      - 40 // length of key hash
+      - 64 // length of namespace hash
+      - 64 // length of key hash
       - 2; // length of separators
 
   private static String computeKeyHash(String memcachedPrefix, NamedKey key)
   {
     // hash keys to keep things under 250 characters for memcached
-    return memcachedPrefix + ":" + DigestUtils.sha1Hex(key.namespace) + ":" + 
DigestUtils.sha1Hex(key.key);
+    return memcachedPrefix + ":" + DigestUtils.sha256Hex(key.namespace) + ":" 
+ DigestUtils.sha256Hex(key.key);

Review Comment:
   My opinion is that Tiger-192 is not a widely used alogrithm in the industry, 
I think SHA256 is better. 
   For the performance penalty of SHA256, we can do a test in a cluster for the 
comparison.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to