summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPengfei Han <40393883+CFlyGoo@users.noreply.github.com>2023-04-18 22:17:22 +0800
committerGitHub <noreply@github.com>2023-04-18 17:17:22 +0300
commit528b0e691ed7f2c07b7bac29ea4234c1fb7df18a (patch)
tree862620dce3088af903216e2e86da32520ba55f2d
parent20533cc1d7684e3ffc8c74bbd6725e4189de6939 (diff)
downloadredis-528b0e691ed7f2c07b7bac29ea4234c1fb7df18a.tar.gz
Update dict.c dict_can_resize comment (#12059)
The comment for dict_can_resize in dict.c should be updated. Currently 0 means DICT_RESIZE_ENABLE, but should actually be DICT_RESIZE_AVOID or 1.
-rw-r--r--src/dict.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dict.c b/src/dict.c
index d46e30588..b3d7fa406 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -52,9 +52,9 @@
* for Redis, as we use copy-on-write and don't want to move too much memory
* around when there is a child performing saving operations.
*
- * Note that even when dict_can_resize is set to 0, not all resizes are
- * prevented: a hash table is still allowed to grow if the ratio between
- * the number of elements and the buckets > dict_force_resize_ratio. */
+ * Note that even when dict_can_resize is set to DICT_RESIZE_AVOID, not all
+ * resizes are prevented: a hash table is still allowed to grow if the ratio
+ * between the number of elements and the buckets > dict_force_resize_ratio. */
static dictResizeEnable dict_can_resize = DICT_RESIZE_ENABLE;
static unsigned int dict_force_resize_ratio = 5;