• Viktor Söderqvist's avatar
    Slot-to-keys using dict entry metadata (#9356) · f24c63a2
    Viktor Söderqvist authored
    
    
    * Enhance dict to support arbitrary metadata carried in dictEntry
    Co-authored-by: default avatarViktor Söderqvist <viktor.soderqvist@est.tech>
    
    * Rewrite slot-to-keys mapping to linked lists using dict entry metadata
    
    This is a memory enhancement for Redis Cluster.
    
    The radix tree slots_to_keys (which duplicates all key names prefixed with their
    slot number) is replaced with a linked list for each slot. The dict entries of
    the same cluster slot form a linked list and the pointers are stored as metadata
    in each dict entry of the main DB dict.
    
    This commit also moves the slot-to-key API from db.c to cluster.c.
    Co-authored-by: default avatarJim Brunner <brunnerj@amazon.com>
    f24c63a2
cluster.h 15.8 KB