redis笔记_源码_字典dict

参考:https://redissrc.readthedocs.io/en/latest/datastruct/dict.html

Expand

条件:

 新的table 大小:

Rehash:

条件:Expand后设置rehash index -1 到0,开始启动rehash

执行:在dictAddRaw,dictGenericDelete,dictFind,dictGetRandomKey中单次执行

原文地址:https://www.cnblogs.com/water-bear/p/11649814.html