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

fix data race in join auto spill (#8145) #8152

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #8145

What problem does this PR solve?

Issue Number: close #8144

Problem Summary:

What is changed and how it works?

Fix data race in join auto spill.
The root cause is join spill will call spilled_partition_indexes.push_back(i); concurrently in auto spill mode.
This pr fix it by

  • Rename spilled_partition_indexes to remaining_partition_indexes_to_restore, and only use this during restore stage
  • Init remaining_partition_indexes_to_restore in workAfterBuildFinish, which is thread safe.

Check List

Tests

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

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

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/cherry-pick-not-approved labels Sep 27, 2023
@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/cherry-pick-for-release-7.4 labels Sep 27, 2023
@ti-chi-bot ti-chi-bot mentioned this pull request Sep 27, 2023
12 tasks
Copy link
Contributor

@yibin87 yibin87 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Sep 27, 2023
Copy link
Contributor

@windtalker windtalker left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: windtalker, yibin87

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 Sep 27, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Sep 27, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-09-27 01:18:59.089010326 +0000 UTC m=+410528.807352543: ☑️ agreed by yibin87.
  • 2023-09-27 01:26:44.416443862 +0000 UTC m=+410994.134786082: ☑️ agreed by windtalker.

@windtalker
Copy link
Contributor

/run-all-tests

@windtalker
Copy link
Contributor

/run-unit-tests

@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Sep 27, 2023
@ti-chi-bot ti-chi-bot bot merged commit d3af2a9 into pingcap:release-7.4 Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/cherry-pick-for-release-7.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants