• Oran Agra's avatar
    RM_Scan disable dict rehashing · 28ef18a8
    Oran Agra authored
    The callback approach we took is very efficient, the module can do any
    filtering of keys without building any list and cloning strings, it can
    also read data from the key's value. but if the user tries to re-open
    the key, or any other key, this can cause dict re-hashing (dictFind does
    that), and that's very bad to do from inside dictScan.
    
    this commit protects the dict from doing any rehashing during scan, but
    also warns the user not to attempt any writes or command calls from
    within the callback, for fear of unexpected side effects and crashes.
    28ef18a8
dict.c 41.4 KB