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

Pipeline: use notify instead of polling for ResultQueue #9065

Merged
merged 70 commits into from
Jun 6, 2024

Conversation

SeaRise
Copy link
Contributor

@SeaRise SeaRise commented May 20, 2024

What problem does this PR solve?

Issue Number: ref #8869

Problem Summary:

What is changed and how it works?

  • use SharedQueue instead of ResultQueue in join restore probe stage.
  • use notify for ResultQueue and GetResultSink
  • remove PipelineExecutorContext::consumeFor due to conflict with ResultQueue::notify.

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 requested review from gengliqi and windtalker May 20, 2024 10:42
@SeaRise
Copy link
Contributor Author

SeaRise commented May 20, 2024

/test all

SeaRise and others added 4 commits May 22, 2024 16:48
Co-authored-by: Rossi Sun <zanmato1984@gmail.com>
Co-authored-by: Rossi Sun <zanmato1984@gmail.com>
Co-authored-by: Rossi Sun <zanmato1984@gmail.com>
return;
tmp = (*result_queue).get();
}
assert(tmp);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why tmp is always not nullptr here?

Copy link
Contributor Author

@SeaRise SeaRise May 27, 2024

Choose a reason for hiding this comment

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

Because if isWaitMode() is false, the result_queue must not be nullptr

@@ -86,7 +86,7 @@ void UnorderedSourceOp::operatePrefixImpl()
else
{
// Poll and check if the RuntimeFilters is ready in the WaitReactor.
TaskScheduler::instance->submitToWaitReactor(std::make_unique<RFWaitTask>(
TaskScheduler::instance->submit(std::make_unique<RFWaitTask>(
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change this? In my understanding, in submit, it will still call submitToWaitReactor?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's just a simple refactoring

@SeaRise SeaRise requested a review from windtalker May 27, 2024 04:49
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

Copy link
Contributor

ti-chi-bot bot commented Jun 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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:
  • OWNERS [gengliqi,windtalker]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

ti-chi-bot bot commented Jun 6, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-05 02:07:13.77047833 +0000 UTC m=+3433387.527613904: ☑️ agreed by windtalker.
  • 2024-06-06 04:40:08.488298108 +0000 UTC m=+7562.541610030: ☑️ agreed by gengliqi.

Copy link
Contributor

ti-chi-bot bot commented Jun 6, 2024

@SeaRise: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

trigger some heavy tests which will not run always when PR updated.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot bot merged commit 115ed4f into pingcap:master Jun 6, 2024
5 checks passed
@SeaRise SeaRise deleted the refine_result_queue branch June 6, 2024 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none 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.

None yet

4 participants