mapleFU commented on PR #2142: URL: https://github.com/apache/kvrocks/pull/2142#issuecomment-1987694271
@tutububug FYI: 1. bitfield: https://github.com/apache/kvrocks/blob/unstable/src/common/bitfield_util.h#L33 . You can refer to these logic or rewrite the HLL logic using these yourself. A value in HLL using redis' impl would be about 13KB, we can storing it in one value. You can also refer to my bit utils: https://github.com/apache/kvrocks/blob/unstable/src/common/bit_util.h . It's not hard but maybe need some time to get familiar with it. Redis uses the similiar logic, but maybe not encapsulate them as tools. 2. Coding style: the redis using macro and some raw-pointers, for maintaining, we'd better using C++ style code 3. Protocol and metadata: currently, this patch only implements "dense" HLL. I'm ok with this. But maybe we can leave a field for "format" in metadata. For example ``` | ... | format-version (1Byte)| ``` And set "dense == 0" here. Thank you for your patient and your code -- 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]
