• Moti Cohen's avatar
    HFE - RDB serialize also hash min expiration (For ROF flow) (#13391) · dcf02298
    Moti Cohen authored
    * Following this feature, Redis (ROF) may implement flow that allows hashes to be
      dumped directly from RDB to FLUSH without parsing. In this scenario, it is still
      essential to determine when to update hashes due to expired fields. By writing
      and reading the next minimum hash-field expiration before serializing objects
      to and from RDB, we can effectively track and expire hash fields without the need
      to parse the hash during loading.
    
        Before:
        #define RDB_TYPE_HASH_METADATA 22
        #define RDB_TYPE_HASH_LISTPACK_EX 23
        
        After:
        /* Hash with HFEs. Doesn't attach min TTL at start */
        #define RDB_TYPE_HASH_METADATA_PRE_GA 22      
        /* Hash LP with HFEs. Doesn't attach min TTL at start */
        #define RDB_TYPE_HASH_LISTPACK_EX_PRE_GA 23   
        /* Hash with HFEs. Attach min TTL at start */
        #define RDB_TYPE_HASH_METADATA 24             
        /* Hash LP with HFEs. Attach min TTL at start */
        #define RDB_TYPE_HASH_LISTPACK_EX 25          
    
    
    * Manually test loading RDB file before the change and verify hash and its HFEs 
      is as expected.
    * Added `subexpires` counter to `redis-check-rdb`
    dcf02298
rdb.c 155 KB