Open
Conversation
change message ScanRequest's end_key field's type from bytes to string (to be the same with as the start_key field)
Collaborator
|
这个区间应该是前闭后开的,end改成string不一定科学 |
Author
|
c++用的少, 没反应过来, 前闭后开跟结束点的类型是string还是bytes 有什么关系呢? 有序,离散的类型都可以前闭后开啊. |
Collaborator
|
比如想读[a, b)之间的所有数据,即:大于等于a,但是小于b,这时区间的end中含'\0',如果使用string就不对了 |
Author
|
如果允许 key 是个含有\0的, 那start也有这个问题啊, 如果是 按你说法那就会把前一条给读到了(多读一条). 那如果允许key里中间带着 \0 的话, 应该两个都用 bytes 对吧? |
Collaborator
|
有道理,改掉吧:) |
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.
change message ScanRequest's end_key field's type from bytes to string (to be the same as the start_key field)