Skip to content
  • Georgios Bitzes's avatar
    Fix serious bug related to iterator consistency · ef3283da
    Georgios Bitzes authored
    DEL would iterate over the contents of the DB,
    not the contents of the staging area. (pending
    changes + DB)
    
    A transaction with the following commands was
    able to trip an assert and cause a crash:
    
    - HSET hash f1 v1
    - HSET hash f2 v2
    - DEL hash
    
    Since DEL was only able to scan fewer elements than
    the size of the key descriptor (due to not having
    "hash#f1" and "hash#f2" in the main DB yet), it
    would detect something was wrong and assert.
    
    Has never happened so far, but it's only a matter
    of time.
    ef3283da