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

[DNM]global sort: new merge step #49212

Closed
wants to merge 30 commits into from
Closed

Conversation

ywqzzy
Copy link
Contributor

@ywqzzy ywqzzy commented Dec 6, 2023

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary:

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Copy link

ti-chi-bot bot commented Dec 6, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 6, 2023
Copy link

tiprow bot commented Dec 6, 2023

Hi @ywqzzy. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

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/test-infra repository.

@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 6, 2023
@ywqzzy ywqzzy marked this pull request as ready for review December 7, 2023 11:15
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 7, 2023
Copy link

codecov bot commented Dec 7, 2023

Codecov Report

Merging #49212 (7b6ab3c) into master (b478056) will decrease coverage by 0.0087%.
Report is 4 commits behind head on master.
The diff coverage is n/a.

❗ Current head 7b6ab3c differs from pull request most recent head e6f7ed5. Consider uploading reports for the commit e6f7ed5 to get more accurate results

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #49212        +/-   ##
================================================
- Coverage   71.0493%   71.0406%   -0.0088%     
================================================
  Files          1368       1368                
  Lines        401715     402727      +1012     
================================================
+ Hits         285416     286100       +684     
- Misses        96443      96696       +253     
- Partials      19856      19931        +75     
Flag Coverage Δ
integration ∅ <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9663% <ø> (ø)
parser ∅ <ø> (∅)
br 52.9106% <ø> (+0.0172%) ⬆️

Copy link

ti-chi-bot bot commented Dec 12, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign benjamin2037, leavrth for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 12, 2023
@ti-chi-bot ti-chi-bot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 12, 2023
@@ -271,7 +271,7 @@ func (r *byteReader) reload() error {
now := r.concurrentReader.now
// in read only false -> true is possible
if !now && to {
r.logger.Info("switch reader mode", zap.Bool("use concurrent mode", true))
// r.logger.Info("switch reader mode", zap.Bool("use concurrent mode", true))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to debug?

MPUUploadIDQuery = "uploadId"

defaultChunkSize = 5 * 1024 * 1024 // 5 MB
defaultRetry = 3 // 建议默认3~5次,不要太大,否则将可能会导致成为僵尸任务。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

translate comments

func (w *GCSWriter) Close() error {
if w.currentWorker != nil {
// uploads the last part, which is not a full part
w.currentWorker.uploadPartAsync()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handle err

return fmt.Errorf("failed to upload part %v too many times, err: %w", uw.index, uw.err)
}
go func() {
err := uw.uploadPart(uw.currentPartNumber, uw.buffer[:uw.offset]) // timeout in few seconds
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we retry upload after some Write, the part-num is changed

Copy link

ti-chi-bot bot commented Dec 12, 2023

[FORMAT CHECKER NOTIFICATION]

Notice: To remove the do-not-merge/needs-linked-issue label, please provide the linked issue number on one line in the PR body, for example: Issue Number: close #123 or Issue Number: ref #456.

📖 For more info, you can check the "Contribute Code" section in the development guide.


Notice: To remove the do-not-merge/needs-tests-checked label, please finished the tests then check the finished items in description.

For example:

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

📖 For more info, you can check the "Contribute Code" section in the development guide.

@D3Hunter
Copy link
Contributor

will review again when #48939 merged

Comment on lines +288 to +295
return false
// failpoint.Inject("forceMergeSort", func(val failpoint.Value) {
// in := val.(string)
// if in == kvGroup || in == "*" {
// failpoint.Return(false)
// }
// })
// return external.GetMaxOverlappingTotal(stats) <= external.MergeSortOverlapThreshold
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change this?

Copy link

ti-chi-bot bot commented Dec 19, 2023

@ywqzzy: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/build e6f7ed5 link true /test build
idc-jenkins-ci-tidb/check_dev e6f7ed5 link true /test check-dev
idc-jenkins-ci-tidb/unit-test e6f7ed5 link true /test unit-test
idc-jenkins-ci-tidb/check_dev_2 e6f7ed5 link true /test check-dev2
pull-integration-ddl-test e6f7ed5 link true /test pull-integration-ddl-test

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@ywqzzy ywqzzy closed this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants