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

Update ins_node.proto #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update ins_node.proto #54

wants to merge 1 commit into from

Conversation

syeerzy
Copy link

@syeerzy syeerzy commented Oct 11, 2018

change message ScanRequest's end_key field's type from bytes to string (to be the same as the start_key field)

change message ScanRequest's end_key field's type from bytes to string (to be the same with as the start_key field)
@yvxiang
Copy link
Collaborator

yvxiang commented Oct 14, 2018

这个区间应该是前闭后开的,end改成string不一定科学

@syeerzy
Copy link
Author

syeerzy commented Oct 15, 2018

c++用的少, 没反应过来, 前闭后开跟结束点的类型是string还是bytes 有什么关系呢? 有序,离散的类型都可以前闭后开啊.

@yvxiang
Copy link
Collaborator

yvxiang commented Oct 15, 2018

比如想读[a, b)之间的所有数据,即:大于等于a,但是小于b,这时区间的end中含'\0',如果使用string就不对了

@syeerzy
Copy link
Author

syeerzy commented Oct 15, 2018

如果允许 key 是个含有\0的, 那start也有这个问题啊, 如果是
....
aa
aaa\0bba
aaa\0bbb <- 期望的 start, 实际上传过去的string是 "aaa"

按你说法那就会把前一条给读到了(多读一条). 那如果允许key里中间带着 \0 的话, 应该两个都用 bytes 对吧?

@yvxiang
Copy link
Collaborator

yvxiang commented Oct 15, 2018

有道理,改掉吧:)

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.

None yet

2 participants