From 6589ac9b708bc4512b0424a52c0af1c8117ab931 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Sun, 5 Jan 2025 20:17:24 -0500 Subject: [PATCH] Co-Authored-By: Nachiket18 --- internal/commandhandler/cmd_meta.go | 9 +++++++++ internal/store/constants.go | 1 + internal/watchmanager/watch_manager.go | 1 + 3 files changed, 11 insertions(+) diff --git a/internal/commandhandler/cmd_meta.go b/internal/commandhandler/cmd_meta.go index cae1bb6b7..41fb920c4 100644 --- a/internal/commandhandler/cmd_meta.go +++ b/internal/commandhandler/cmd_meta.go @@ -111,6 +111,7 @@ const ( CmdCMSIncrBy = "CMS.INCRBY" CmdHSet = "HSET" CmdHGet = "HGET" + CmdHGetAll = "HGETALL" CmdHSetnx = "HSETNX" CmdHDel = "HDEL" CmdHMSet = "HMSET" @@ -211,6 +212,8 @@ const ( CmdZRangeUnWatch = "ZRANGE.UNWATCH" CmdPFCountWatch = "PFCOUNT.WATCH" CmdPFCountUnWatch = "PFCOUNT.UNWATCH" + CmdHGetAllWatch = "HGETALL.WATCH" + CmdHGetAllUnWatch = "HGETALL.UNWATCH" ) type CmdMeta struct { @@ -676,6 +679,9 @@ var CommandsMeta = map[string]CmdMeta{ CmdPFCountWatch: { CmdType: Watch, }, + CmdHGetAllWatch: { + CmdType: Watch, + }, // Unwatch commands CmdGetUnWatch: { @@ -687,6 +693,9 @@ var CommandsMeta = map[string]CmdMeta{ CmdPFCountUnWatch: { CmdType: Unwatch, }, + CmdHGetAllUnWatch: { + CmdType: Unwatch, + }, } func init() { diff --git a/internal/store/constants.go b/internal/store/constants.go index 1c2e8d95a..80ced9fea 100644 --- a/internal/store/constants.go +++ b/internal/store/constants.go @@ -35,4 +35,5 @@ const ( SingleShardTouch string = "SINGLETOUCH" SingleShardKeys string = "SINGLEKEYS" FlushDB string = "FLUSHDB" + HGetAll string = "HGETALL" ) diff --git a/internal/watchmanager/watch_manager.go b/internal/watchmanager/watch_manager.go index 99eda75c9..7e88f578a 100644 --- a/internal/watchmanager/watch_manager.go +++ b/internal/watchmanager/watch_manager.go @@ -50,6 +50,7 @@ var ( dstore.ZAdd: {dstore.ZRange: struct{}{}}, dstore.PFADD: {dstore.PFCOUNT: struct{}{}}, dstore.PFMERGE: {dstore.PFCOUNT: struct{}{}}, + dstore.HSET: {dstore.HGETALL: struct{}{}}, } )