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


##########
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:
   The number look good. Now lets proceed to the testing bit.
   
   The way to test it would be to see if repeated queries are indeed using 
cache. Can you please try to deploy it on a cluster with at least 2 brokers and 
2 historicals and see if things work ?



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