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

Some refine of auto spill check #7935

Merged

Conversation

windtalker
Copy link
Contributor

@windtalker windtalker commented Aug 14, 2023

What problem does this PR solve?

Issue Number: ref #7738

Problem Summary:

What is changed and how it works?

  • Add minimum interval time in auto spill check
  • Distinguish auto spill and spill that based on operator's memory threshold, if auto spill is enabled, operator's memory threshold will be disabled.
  • In triggerSpill, if an operator is already be marked to be spill by other triggerSpill call, but the spill has not finished, the revocable memory of that operator will be treated as effective released memory by current triggerSpill.

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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 14, 2023
@SeaRise SeaRise self-requested a review August 14, 2023 06:23
Copy link
Contributor

@SeaRise SeaRise left a comment

Choose a reason for hiding this comment

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

Others LGTM

dbms/src/Core/QueryOperatorSpillContexts.h Outdated Show resolved Hide resolved
@windtalker windtalker force-pushed the add_min_interval_time_in_auto_spill branch from e6324a5 to 9aac90f Compare August 18, 2023 08:36
@windtalker windtalker changed the title add min interval time in auto spill check Some refine of auto spill check Aug 18, 2023
@SeaRise SeaRise self-requested a review August 18, 2023 09:05
Copy link
Contributor

@SeaRise SeaRise 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 Aug 18, 2023
@windtalker windtalker force-pushed the add_min_interval_time_in_auto_spill branch from 950a96b to dbaf4b4 Compare August 18, 2023 10:18
@ti-chi-bot ti-chi-bot 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. labels Aug 18, 2023
@SeaRise
Copy link
Contributor

SeaRise commented Aug 21, 2023

/run-sanitizer-test tsan

Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
@windtalker windtalker force-pushed the add_min_interval_time_in_auto_spill branch from dbaf4b4 to 7a29a25 Compare August 21, 2023 06:16
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.

others LGTM

NO_NEED_AUTO_SPILL,
/// auto spill is needed
/// WAI_SPILL_FINISH means the operator is aware that it needs spill, but spill does not finish yet
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment typo, WAIT_SPILL_FINISH

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SeaRise, 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 Aug 22, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 22, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-08-18 09:27:44.41164598 +0000 UTC m=+882428.960661962: ☑️ agreed by SeaRise.
  • 2023-08-22 08:46:33.916890996 +0000 UTC m=+1225558.465906984: ☑️ agreed by yibin87.

@windtalker
Copy link
Contributor Author

/run-all-tests

@ti-chi-bot ti-chi-bot bot merged commit 6559c82 into pingcap:master Aug 22, 2023
@windtalker windtalker deleted the add_min_interval_time_in_auto_spill branch September 20, 2023 00:25
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants