Unverified Commit 293a68af authored by Ozan Tezcan's avatar Ozan Tezcan Committed by GitHub
Browse files

Use lookupKeyWrite() for hpersist command (#13321)

As hpersist is a write command, we should use lookupKeyWrite() instead
of lookupKeyRead() to fetch the key.
parent 44352bee
......@@ -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")) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment