Valay17 commented on code in PR #3313:
URL: https://github.com/apache/kvrocks/pull/3313#discussion_r2649736234


##########
src/types/redis_string.cc:
##########
@@ -657,4 +659,20 @@ rocksdb::Status String::LCS(engine::Context &ctx, const 
std::string &user_key1,
   return rocksdb::Status::OK();
 }
 
+std::string String::ComputeXXH3Hash(const std::string &data) {
+  uint64_t hash = XXH3_64bits(data.data(), data.size());
+  return fmt::format("{:016x}", hash);
+}

Review Comment:
   Actually no, because the DELEX and SET command relies on this command so 
keeping a method is the right way to do it. If we do it this way it will be 
easier to add more commands in the future that requires DIGEST and also change 
the hashing algorithm by just changing this 1 function instead of changing it 
multiple times in various places.



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

Reply via email to