From f33bf2aea1f9142af85cbda457d2e19f47ccdc0b Mon Sep 17 00:00:00 2001 From: erhan1209 <82086267+erhan1209@users.noreply.github.com> Date: Thu, 16 Apr 2026 11:30:32 +0300 Subject: [PATCH] Update t_hash.c --- src/t_hash.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/t_hash.c b/src/t_hash.c index 7dbe7eab8..5b0374610 100644 --- a/src/t_hash.c +++ b/src/t_hash.c @@ -2917,11 +2917,13 @@ void hgetexCommand(client *c) { * or the new expiration time is in the past. */ newlen = hashTypeLength(o, 0); if (newlen == 0) { + updateKeysizesHist(c->db, OBJ_HASH, oldlen, 0); dbDeleteSkipKeysizesUpdate(c->db, c->argv[1]); notifyKeyspaceEvent(NOTIFY_GENERIC, "del", c->argv[1], c->db->id); - newlen = -1; + updateKeysizesHist(c->db, OBJ_HASH, 0, -1); + } else { + updateKeysizesHist(c->db, OBJ_HASH, oldlen, newlen); } - updateKeysizesHist(c->db, OBJ_HASH, oldlen, newlen); } void hdelCommand(client *c) {