Skip to content

Conversation

xzhangxian1008
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #59655

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.

Fix the issue that parallel sort will hang when `resultChannel` is full

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed do-not-merge/invalid-title release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 20, 2025
Copy link

tiprow bot commented Feb 20, 2025

Hi @xzhangxian1008. 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-sigs/prow repository.

@xzhangxian1008 xzhangxian1008 changed the title Fix the hang of parallel sort when resultChannel is full executor: fix the hang of parallel sort when resultChannel is full Feb 20, 2025
@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. and removed do-not-merge/invalid-title do-not-merge/needs-triage-completed labels Feb 20, 2025
@xzhangxian1008
Copy link
Contributor Author

/cc @wshwsh12 @XuHuaiyu

@ti-chi-bot ti-chi-bot bot requested review from wshwsh12 and XuHuaiyu February 20, 2025 03:05
Copy link

codecov bot commented Feb 20, 2025

Codecov Report

Attention: Patch coverage is 92.98246% with 4 lines in your changes missing coverage. Please review.

Project coverage is 73.6858%. Comparing base (0ac0618) to head (11963e6).
Report is 92 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59658        +/-   ##
================================================
+ Coverage   72.9595%   73.6858%   +0.7263%     
================================================
  Files          1694       1705        +11     
  Lines        468654     483235     +14581     
================================================
+ Hits         341928     356076     +14148     
- Misses       105675     105801       +126     
- Partials      21051      21358       +307     
Flag Coverage Δ
integration 42.9719% <1.7543%> (?)
unit 72.5233% <92.9824%> (+0.3749%) ⬆️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 46.9381% <ø> (+1.8881%) ⬆️
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xzhangxian1008
Copy link
Contributor Author

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 20, 2025
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 20, 2025
@xzhangxian1008
Copy link
Contributor Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 21, 2025
@xzhangxian1008
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Feb 21, 2025

@xzhangxian1008: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@xzhangxian1008
Copy link
Contributor Author

/cc @wshwsh12 @XuHuaiyu

2 similar comments
@xzhangxian1008
Copy link
Contributor Author

/cc @wshwsh12 @XuHuaiyu

@xzhangxian1008
Copy link
Contributor Author

/cc @wshwsh12 @XuHuaiyu

workerWaiter := &sync.WaitGroup{}
workerWaiter.Add(workerNum)
sortedRowsIters := make([]*chunk.Iterator4Slice, workerNum)
errChannel := make(chan error, workerNum*2)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why workerNum*2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why workerNum*2?

One worker may put to err into channel respectively at L145 and L132.

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 3, 2025
@xzhangxian1008
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Mar 3, 2025

@xzhangxian1008: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@xzhangxian1008
Copy link
Contributor Author

/cc @wshwsh12 @XuHuaiyu

Copy link
Contributor

@wshwsh12 wshwsh12 left a comment

Choose a reason for hiding this comment

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

Rest LGTM

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 3, 2025
@xzhangxian1008
Copy link
Contributor Author

/cc @XuHuaiyu

2 similar comments
@xzhangxian1008
Copy link
Contributor Author

/cc @XuHuaiyu

@xzhangxian1008
Copy link
Contributor Author

/cc @XuHuaiyu

@xzhangxian1008 xzhangxian1008 requested a review from XuHuaiyu March 6, 2025 06:50
@xzhangxian1008
Copy link
Contributor Author

/cc @XuHuaiyu

1 similar comment
@xzhangxian1008
Copy link
Contributor Author

/cc @XuHuaiyu

Copy link

ti-chi-bot bot commented Mar 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wshwsh12, XuHuaiyu

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 10, 2025
Copy link

ti-chi-bot bot commented Mar 10, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-03-03 06:42:53.656650465 +0000 UTC m=+251086.785570203: ☑️ agreed by wshwsh12.
  • 2025-03-10 05:52:43.049202049 +0000 UTC m=+162318.654730976: ☑️ agreed by XuHuaiyu.

@xzhangxian1008
Copy link
Contributor Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 10, 2025
@ti-chi-bot ti-chi-bot bot merged commit 72517f4 into pingcap:master Mar 10, 2025
24 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #59980.

@xzhangxian1008 xzhangxian1008 deleted the fix-59655 branch March 11, 2025 00:28
@ti-chi-bot ti-chi-bot bot removed the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parallel sort hangs when there is an error
4 participants