• sundb's avatar
    Replace ziplist with listpack in quicklist (#9740) · 45129059
    sundb authored
    Part three of implementing #8702, following #8887 and #9366 .
    
    ## Description of the feature
    1. Replace the ziplist container of quicklist with listpack.
    2. Convert existing quicklist ziplists on RDB loading time. an O(n) operation.
    
    ## Interface changes
    1. New `list-max-listpack-size` config is an alias for `list-max-ziplist-size`.
    2. Replace `debug ziplist` command with `debug listpack`.
    
    ## Internal changes
    1. Add `lpMerge` to merge two listpacks . (same as `ziplistMerge`)
    2. Add `lpRepr` to print info of listpack which is used in debugCommand and `quicklistRepr`. (same as `ziplistRepr`)
    3. Replace `QUICKLIST_NODE_CONTAINER_ZIPLIST` with `QUICKLIST_NODE_CONTAINER_PACKED`(following #9357 ).
        It represent that a quicklistNode is a packed node, as opposed to a plain node.
    4. Remove `createZiplistObject` method, which is never used.
    5. Calculate listpack entry size using overhead overestimation in `quicklistAllowInsert`.
        We prefer a...
    45129059
listpack.h 4.86 KB