• Binbin's avatar
    Add new DEBUG dict-resizing command to disable the dict resize (#13043) · 493e31e3
    Binbin authored
    The test fails here and there:
    ```
    *** [err]: expire scan should skip dictionaries with lot's of empty buckets in tests/unit/expire.tcl
    scan didn't handle slot skipping logic.
    ```
    
    There are two case:
    1. In the case of passing the test, we use child process to avoid the
    dict resize, but it can not completely limit it, since in the dictDelete
    we still have chance to trigger the resize (hit the force radio). The
    reason why our test passed before is because the expire dict is still
    in the rehashing process, so the dictDelete, the dictShrinkIfNeeded can
    not trigger the resize.
    
    2. In the case of failing the test, the expire dict finished the
    rehashing,
    so the last dictDelete, the dictShrinkIfNeeded trigger the dict resize
    since it hit the force radio, so the skipping logic fail.
    
    This PR add a new DEBUG command to disbale the dict resize.
    493e31e3
server.c 286 KB