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

make ContainsByEnd return true when the key is empty and region's right bound is inf #1052

Merged
merged 8 commits into from
Nov 14, 2023

Conversation

YuJuncen
Copy link
Contributor

@YuJuncen YuJuncen commented Nov 8, 2023

Signed-off-by: hillium [email protected]

Ref: #1051

I think the semantic of ContainsByEnd should be: "Please check whether this key is in the range, if the input is empty, treat it as infinity.". But I have noticed there are already some test cases that believes "" shouldn't be in ("", ""]. I'm not sure whether it is by design.

Anyway this will bring unexpected behavior sometimes (say, make infinity loops), I think perhaps we can make it better.

@YuJuncen
Copy link
Contributor Author

YuJuncen commented Nov 8, 2023

/cc @disksing

@disksing
Copy link
Collaborator

disksing commented Nov 9, 2023

I think you're right, but I need to check all usages of this function to prevent this modification from accidentally breaking something.

@disksing
Copy link
Collaborator

disksing commented Nov 9, 2023

I think you're right, but I need to check all usages of this function to prevent this modification from accidentally breaking something.

checked, it should be fine.

@disksing disksing merged commit 6659170 into tikv:master Nov 14, 2023
9 of 10 checks passed
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