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

globalsort: skip retry when context has error #58828

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

lance6716
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #58826

Problem Summary:

What changed and how does it work?

just a log improvement

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

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 9, 2025
Copy link

tiprow bot commented Jan 9, 2025

Hi @lance6716. 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.

Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.8477%. Comparing base (448e302) to head (558e43d).
Report is 16 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #58828        +/-   ##
================================================
+ Coverage   73.1515%   73.8477%   +0.6962%     
================================================
  Files          1677       1707        +30     
  Lines        463907     474334     +10427     
================================================
+ Hits         339355     350285     +10930     
+ Misses       103699     102467      -1232     
- Partials      20853      21582       +729     
Flag Coverage Δ
integration 45.6907% <0.0000%> (?)
unit 72.3397% <100.0000%> (-0.0208%) ⬇️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 45.7659% <ø> (+0.0299%) ⬆️

@lance6716 lance6716 requested a review from D3Hunter January 9, 2025 08:56
@lance6716
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Jan 10, 2025

@lance6716: 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.

@@ -463,7 +463,7 @@ func (w *Writer) flushKVs(ctx context.Context, fromClose bool) (err error) {
var dataFile, statFile string
for i := 0; i < flushKVsRetryTimes; i++ {
dataFile, statFile, err = w.flushSortedKVs(ctx)
if err == nil {
if err == nil || ctx.Err() != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Normally, Can we know which errors that ctx may occur during global sort period? Dose all of them can cause tasks return?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

here I didn't want to check error. I check that user context is canceled (although the interface is ctx.Err()). When context is canceled, this for loop will run flushKVsRetryTimes times but immediately flushSortedKVs will return because of ctx.Err(), and below log line will be printed unnecessarily.

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 13, 2025
Copy link

ti-chi-bot bot commented Jan 13, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: D3Hunter, joccau

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 Jan 13, 2025
Copy link

ti-chi-bot bot commented Jan 13, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-13 02:18:31.062587287 +0000 UTC m=+752054.351418992: ☑️ agreed by D3Hunter.
  • 2025-01-13 03:10:32.306646783 +0000 UTC m=+755175.595478512: ☑️ agreed by joccau.

@ti-chi-bot ti-chi-bot bot merged commit c176384 into pingcap:master Jan 13, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

global sort should not bother to retry when context has error
4 participants