-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
util/ranger: move cut prefix logic for prefix index to ealier stage #48582
util/ranger: move cut prefix logic for prefix index to ealier stage #48582
Conversation
Skipping CI for Draft Pull Request. |
Skipping CI for Draft Pull Request. |
/test all |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #48582 +/- ##
================================================
+ Coverage 71.0083% 72.7016% +1.6933%
================================================
Files 1367 1392 +25
Lines 404865 420557 +15692
================================================
+ Hits 287488 305752 +18264
+ Misses 97372 95754 -1618
+ Partials 20005 19051 -954
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/test all |
/retest |
/test all |
/retest |
1 similar comment
/retest |
b0d460e
to
c34f88c
Compare
/retest |
/test check-dev2 |
@time-and-fate: The specified target(s) for
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
c34f88c
to
c8ae4db
Compare
/retest |
/test unit-test |
@time-and-fate: The specified target(s) for
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test unit-test |
@time-and-fate: The specified target(s) for
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test unit-test |
@time-and-fate: The specified target(s) for
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tangenta, winoros The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test unit-test |
@time-and-fate: The specified target(s) for
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test unit-test |
@time-and-fate: The specified target(s) for
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test unit-test |
@time-and-fate: The specified target(s) for
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test unit-test |
@time-and-fate: The specified target(s) for
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test check-dev2 |
@time-and-fate: The specified target(s) for
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test unit-test |
@time-and-fate: The specified target(s) for
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test unit-test |
@time-and-fate: The specified target(s) for
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What problem does this PR solve?
Issue Number: ref #48181
What is changed and how it works?
This is part of the prerequisite to implement #48181.
Current logic:
point
s, which will be further built intoRange
s.point
s intoRange
s.Range
s.However, to implement #48181, we need to convert strings into sort key when building points, while cutting prefix require the original value (because prefix length is calculated by characters instead of bytes).
Therefore, we have to move the cutting prefix logic to an earlier stage, into the points builder.
Fortunately, cutting prefix on
point
s is similar to cutting onRange
. And other existing logic (appending points into ranges, reserving a selection, etc,) will take care of other things.Side effects
To eliminate possible overlapped ranges after cutting prefix, a
UnionRange
is needed.Previously, we only do this when a cut actually happens. That's easy to implement because they are at the same place in the code.
Now, they are in different stages in code logic. So we always do
UnionRange
for prefix index, even if the cut doesn't happen. (We thinkUnionRange
is a safe operation, and it doesn't affect the correctness)This will result in a side effect, ranges like ['a' 1, 'a' 1], ['a' 2, 'a' 2], ['a' 3, 'a' 3] will become ['a' 1, 'a' 3]. This doesn't affect correctness but has some subtle influence on estimation and performance.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.