Skip to content

Fix error message for the DEBUG ZIPLIST command#7745

Merged
itamarhaber merged 1 commit intoredis:unstablefrom
pjambet:fix-debug-ziplist-error-message
Sep 2, 2020
Merged

Fix error message for the DEBUG ZIPLIST command#7745
itamarhaber merged 1 commit intoredis:unstablefrom
pjambet:fix-debug-ziplist-error-message

Conversation

@pjambet
Copy link
Contributor

@pjambet pjambet commented Sep 2, 2020

DEBUG ZIPLIST currently returns the following error string if the
key is not a ziplist: "ERR Not an sds encoded string.". This looks like
an accidental copy/paste error from the error returned in the else if
branch above where this string is returned if the key is not an sds
string. The command was added in
ac61f90 and looking at the commit,
nothing indicates that it is not an accidental typo.

The error string now returns a correct error: "Not a ziplist encoded
object", which accurately describes the error.


It doesn't look like like there are any tests for the DEBUG SDSLEN command, so I didn't add any here, but I'd be happy to add some if that was deemed necessary (which I kinda doubt given it's a debug command, but maybe?)

DEBUG ZIPLIST <key> currently returns the following error string if the
key is not a ziplist: "ERR Not an sds encoded string.". This looks like
an accidental copy/paste error from the error returned in the else if
branch above where this string is returned if the key is not an sds
string. The command was added in
ac61f90 and looking at the commit,
nothing indicates that it is not an accidental typo.

The error string now returns a correct error: "Not a ziplist encoded
object", which accurately describes the error.
@itamarhaber
Copy link
Member

Thanks @pjambet - merging.

@itamarhaber itamarhaber merged commit d52ce4e into redis:unstable Sep 2, 2020
@pjambet pjambet deleted the fix-debug-ziplist-error-message branch September 2, 2020 20:37
@pjambet
Copy link
Contributor Author

pjambet commented Sep 2, 2020

Thanks @itamarhaber for the quick turnaround!

JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Nov 4, 2020
DEBUG ZIPLIST <key> currently returns the following error string if the
key is not a ziplist: "ERR Not an sds encoded string.". This looks like
an accidental copy/paste error from the error returned in the else if
branch above where this string is returned if the key is not an sds
string. The command was added in
ac61f90 and looking at the commit,
nothing indicates that it is not an accidental typo.

The error string now returns a correct error: "Not a ziplist encoded
object", which accurately describes the error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants