-
Notifications
You must be signed in to change notification settings - Fork 6k
globalsort: use partitioned prefix to store intermediate files #62905
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
Conversation
Hi @D3Hunter. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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-sigs/prow repository. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #62905 +/- ##
================================================
+ Coverage 72.8039% 75.0238% +2.2199%
================================================
Files 1793 1842 +49
Lines 487640 501678 +14038
================================================
+ Hits 355021 376378 +21357
+ Misses 111000 102170 -8830
- Partials 21619 23130 +1511
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
/retest |
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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-sigs/prow repository. |
/retest |
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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-sigs/prow repository. |
/retest |
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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-sigs/prow repository. |
/retest |
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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-sigs/prow repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
return filepath.Join(partitionPrefix, prefix) | ||
} | ||
|
||
func isValidPartition(in []byte) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can use regexp like ^p[01]{8}$
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the partition prefix have fixed length 1+8, i think direct check is fine, and it's faster
BenchmarkCheck/validPartition
BenchmarkCheck/validPartition-10 95861958 11.21 ns/op
BenchmarkCheck/validPartitionRegex
BenchmarkCheck/validPartitionRegex-10 7832720 152.7 ns/op
func validPartition(str string) bool {
if len(str) != 9 {
return false
}
b := []byte(str)
if b[0] != 'p' {
return false
}
for i := 1; i < 9; i++ {
if b[i] != '0' && b[i] != '1' {
return false
}
}
return true
}
var re = regexp.MustCompile(`^p[01]{8}$`)
func validPartitionRegex(str string) bool {
return re.MatchString(str)
}
func BenchmarkCheck(b *testing.B) {
b.Run("validPartition", func(b *testing.B) {
for range b.N {
validPartition("p00000000")
}
})
b.Run("validPartitionRegex", func(b *testing.B) {
for range b.N {
validPartitionRegex("p00000000")
}
})
}
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: GMHDBJD, hawkingrei, joechenrh 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 |
/retest |
1 similar comment
/retest |
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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-sigs/prow repository. |
/cherry-pick release-nextgen-20250815 |
@D3Hunter: new pull request created to branch 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 ti-community-infra/tichi repository. |
What problem does this PR solve?
Issue Number: close #62904
Problem Summary:
What changed and how does it work?
Check List
Tests
intermediate files of importing using global sort, and they are successfully cleanup after it.
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.