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

executor: change the behavior of mem-quota-query #37098

Closed
wants to merge 19 commits into from

Conversation

wshwsh12
Copy link
Contributor

@wshwsh12 wshwsh12 commented Aug 15, 2022

What problem does this PR solve?

Issue Number: close #37104

Problem Summary:

What is changed and how it works?

  1. When the memory exceeds the threshold of 0.8, trigger all spilling action.
  2. Move the fallback mechanism from Action() to Consume().
  3. Remove the priority logic for OOM Action.

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

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

When the memory exceeds the threshold of 0.8*`mem-query-quota`, trigger all spilling action.

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added do-not-merge/needs-linked-issue 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. labels Aug 15, 2022
@ti-chi-bot ti-chi-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. do-not-merge/needs-linked-issue labels Aug 15, 2022
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 16, 2022

@wshwsh12 wshwsh12 force-pushed the soft-limit-per-query branch from de42fd2 to 1e5af99 Compare August 16, 2022 07:29
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 27, 2022
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 29, 2022
@XuHuaiyu XuHuaiyu added the type/enhancement The issue or PR belongs to an enhancement. label Aug 31, 2022
@@ -398,6 +369,30 @@ func (t *Tracker) Consume(bs int64) {
}
}

func tryAction(mu *actionMu, tracker *Tracker) {
actionOne := func(nowAction ActionOnExceed, tracker *Tracker) ActionOnExceed {
for nowAction != nil && nowAction.IsFinished() {
Copy link
Contributor

Choose a reason for hiding this comment

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

nowAction --> currentAction

@wshwsh12 wshwsh12 requested a review from XuHuaiyu September 26, 2022 02:43
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 26, 2022
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 26, 2022
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 28, 2022
@ti-chi-bot
Copy link
Member

@wshwsh12: PR needs rebase.

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.

@@ -1719,6 +1718,7 @@ func TestDoDDLJobQuit(t *testing.T) {
}

func TestCoprocessorOOMAction(t *testing.T) {
t.Skip("rate limit action can't control the memory usage in time, skip now")
Copy link
Contributor

Choose a reason for hiding this comment

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

rate_limit is disabled, can this unit test pass for now?

@XuHuaiyu XuHuaiyu added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 10, 2022
@wshwsh12 wshwsh12 closed this Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change the behavior of mem-quota-query
3 participants