Fix hgetf/hsetf reply type by returning string#13263
Merged
tezc merged 2 commits intoredis:hash-field-expiry-integfrom May 13, 2024
Merged
Fix hgetf/hsetf reply type by returning string#13263tezc merged 2 commits intoredis:hash-field-expiry-integfrom
tezc merged 2 commits intoredis:hash-field-expiry-integfrom
Conversation
sundb
approved these changes
May 13, 2024
LiorKogan
reviewed
May 13, 2024
| "summary": "For each specified field: get its value and optionally set the field's remaining time to live / UNIX expiration timestamp in seconds / milliseconds", | ||
| "complexity": "O(N) where N is the number of arguments to the command", | ||
| "group": "hash", | ||
| "since": "8.0.0", |
Member
There was a problem hiding this comment.
Shouldn't it be 7.4 (for all HFE commands)?
Collaborator
Author
There was a problem hiding this comment.
I'm aware of this and we need to change it for all hfe commands. I'll address in a future PR.
This was referenced May 13, 2024
funny-dog
pushed a commit
to funny-dog/redis
that referenced
this pull request
Sep 17, 2025
If encoding is listpack, hgetf and hsetf commands reply field value type as integer. This PR fixes it by returning string. Problematic cases: ``` 127.0.0.1:6379> hset hash one 1 (integer) 1 127.0.0.1:6379> hgetf hash fields 1 one 1) (integer) 1 127.0.0.1:6379> hsetf hash GETOLD fvs 1 one 2 1) (integer) 1 127.0.0.1:6379> hsetf hash DOF GETNEW fvs 1 one 2 1) (integer) 2 ``` Additional fixes: - hgetf/hsetf command description text Fixes redis#13261, redis#13262
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If encoding is listpack, hgetf and hsetf commands reply field value type as integer.
This PR fixes it by returning string.
Problematic cases:
Additional fixes:
Fixes #13261, #13262