Skip to content
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

fix prefix_range_end #1647

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

fix prefix_range_end #1647

wants to merge 2 commits into from

Conversation

PingHao
Copy link

@PingHao PingHao commented Aug 4, 2021

to align with etcd go client implement
https://github.com/etcd-io/etcd/blob/e591fcba335ef41f23d675563bed526d2f5bd72c/client/v3/op.go#L365

prefix_range_end(b'ab\xff') should be b'ac'

@kragniz
Copy link
Owner

kragniz commented Aug 5, 2021

@tmccombs could you take a look at this pr? I'm not sure how #1125 and this fit together

tmccombs
tmccombs previously approved these changes Aug 7, 2021
Copy link
Contributor

@tmccombs tmccombs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks mostly right to me. I will note though that the behavior is slightly different than the Go implementation. This raises an exception if the prefix is entirely composed of b'\xff', whereas the go implementation returns b'\0'`, which would I believe result in an empty response.

@PingHao
Copy link
Author

PingHao commented Aug 7, 2021

This looks mostly right to me. I will note though that the behavior is slightly different than the Go implementation. This raises an exception if the prefix is entirely composed of b'\xff', whereas the go implementation returns b'\0'`, which would I believe result in an empty response.

@tmccombs Thanks to catch it up. code updated.

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.

3 participants