PragmaTwice commented on PR #2142:
URL: https://github.com/apache/kvrocks/pull/2142#issuecomment-1986756740

   > @PragmaTwice I create a 
PR([apache/kvrocks-website#207](https://github.com/apache/kvrocks-website/pull/207))
 for describe hyperloglog storage format.
   
   Thank you! Currently, it is only necessary to include your design in the PR 
description, not on the website as the design is not finalized yet.
   
   Regarding your design, I have some questions:
   1) Based on the current design, typically one Redis key will introduce a 
maximum of 16384 RocksDB keys (registers). Each value corresponding to a 
RocksDB key contains only one integer. This may be inefficient; merging 
multiple registers onto one key could reduce the number of keys introduced.
   2) I noticed that integers are stored as string representations 
(`std::to_string`) rather than their binary form (e.g., subkey and register 
value). What is the reason for this approach?
   3) Having a constant `size` seems illogical since the number of subkeys 
linked to this Redis key varies.
   
   Concerning the code, although I haven't reviewed it thoroughly yet, there 
are some points worth mentioning:
   1) The complete source code of MurmurHash can be placed in the `vendor` 
directory.
   2) It appears that using `PFADD` in the code leads to an increasing number 
of RocksDB keys (registers). There seems to be no operation that reduces these 
keys until deleting this Redis key. How can we prevent an increase in RocksDB 
keys without a mechanism to decrease them?
   


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