• perryitay's avatar
    Add support for list type to store elements larger than 4GB (#9357) · f27083a4
    perryitay authored
    
    
    Redis lists are stored in quicklist, which is currently a linked list of ziplists.
    Ziplists are limited to storing elements no larger than 4GB, so when bigger
    items are added they're getting truncated.
    This PR changes quicklists so that they're capable of storing large items
    in quicklist nodes that are plain string buffers rather than ziplist.
    
    As part of the PR there were few other changes in redis: 
    1. new DEBUG sub-commands: 
       - QUICKLIST-PACKED-THRESHOLD - set the threshold of for the node type to
         be plan or ziplist. default (1GB)
       - QUICKLIST <key> - Shows low level info about the quicklist encoding of <key>
    2. rdb format change:
       - A new type was added - RDB_TYPE_LIST_QUICKLIST_2 . 
       - container type (packed / plain) was added to the beginning of the rdb object
         (before the actual node list).
    3. testing:
       - Tests that requires over 100MB will be by default skipped. a new flag was
         added to 'runtest' to run the large memory tests (not used by default)
    Co-authored-by: default avatarsundb <sundbcn@gmail.com>
    Co-authored-by: default avatarOran Agra <oran@redislabs.com>
    f27083a4
t_list.c 41.9 KB