-
Notifications
You must be signed in to change notification settings - Fork 990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve BITPOS command #3893
Labels
bug
Something isn't working
good first issue
Good for newcomers
hacktoberfest
Participates in Hacktoberfest
help wanted
Extra attention is needed
Comments
I think this can be a |
Sure |
Niennienzz
added
good first issue
Good for newcomers
hacktoberfest
Participates in Hacktoberfest
labels
Oct 7, 2024
Hey, do you mind if i take it? |
@Diskein sure! |
Diskein
added a commit
to Diskein/dragonfly
that referenced
this issue
Oct 11, 2024
BITPOS returns 0 for non-existent keys according to Redis's implmentation. BITPOS allows only 0 and 1 as the bit mode argument.
Diskein
added a commit
to Diskein/dragonfly
that referenced
this issue
Oct 11, 2024
BITPOS returns 0 for non-existent keys according to Redis's implmentation. BITPOS allows only 0 and 1 as the bit mode argument. Signed-off-by: Denis K <[email protected]>
romange
pushed a commit
that referenced
this issue
Oct 12, 2024
BITPOS returns 0 for non-existent keys according to Redis's implmentation. BITPOS allows only 0 and 1 as the bit mode argument. Signed-off-by: Denis K <[email protected]>
@Niennienzz you can close this issue since the problems were resolved in #3910 |
Fixed by #3910 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
good first issue
Good for newcomers
hacktoberfest
Participates in Hacktoberfest
help wanted
Extra attention is needed
Currently, the
BITPOS
command works fine for normal cases. However, for some edge cases, it's not behaving the same as Redis/Valkey. It's better to improve this command for edge cases.Specifically:
The
bit
parameter should accept only0
or1
:For non-existent or empty strings, Dragonfly always returns
-1
, which makes sense to me. But for compatibility purpose, this can be improved as well so that client SDKs can deal with it better. See example and details below.Taking from the Redis doc:
The text was updated successfully, but these errors were encountered: