mirror of
https://github.com/redis/redis.git
synced 2026-05-28 04:02:46 -04:00
Use lookupKeyWrite() for hpersist command (#13321)
As hpersist is a write command, we should use lookupKeyWrite() instead of lookupKeyRead() to fetch the key.
This commit is contained in:
parent
44352beefa
commit
293a68afdf
1 changed files with 1 additions and 1 deletions
|
|
@ -3115,7 +3115,7 @@ void hpersistCommand(client *c) {
|
|||
int changed = 0; /* Used to determine whether to send a notification. */
|
||||
|
||||
/* Read the hash object */
|
||||
if ((hashObj = lookupKeyReadOrReply(c, c->argv[1], shared.emptyarray)) == NULL ||
|
||||
if ((hashObj = lookupKeyWriteOrReply(c, c->argv[1], shared.emptyarray)) == NULL ||
|
||||
checkType(c, hashObj, OBJ_HASH)) return;
|
||||
|
||||
if (strcasecmp(c->argv[numFieldsAt-1]->ptr, "FIELDS")) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue