GitHub user hidedim added a comment to the discussion: TopK proposal

Bucket *bucket and HeapBucket *heap have fixed sizes, determined by the 
parameters width, depth, and k, respectively. Only char *item is variable in 
size, depending on the given item. The storage of subkey depends on its 
location in the heap. Calling the add or incrby functions may modify the data 
in Bucket *bucket and HeapBucket *heap, requiring them to be rewritten, along 
with the corresponding char *item inside them. Currently, my approach is to 
rewrite the entire data structure (this can be optimized by using a bool flag 
to determine whether the internal data has changed and needs to be rewritten).

GitHub link: 
https://github.com/apache/kvrocks/discussions/3259#discussioncomment-14957402

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to