• debing.sun's avatar
    Increment kvstore's non_empty_dicts only on first insert (#13528) · 2dd4cca3
    debing.sun authored
    
    
    Found by @oranagra 
    
    Currently, when the size of dict becomes 1, we do not check whether
    `delta` is positive or negative.
    As a result, `non_empty_dicts` is still incremented when the size of
    dict changes from 2 to 1.
    We should only increment `non_empty_dicts` when `delta` is positive, as
    this indicates the first time an element is inserted into the dict.
    
    ---------
    Co-authored-by: default avataroranagra <oran@redislabs.com>
    2dd4cca3
kvstore.c 36.6 KB