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

Parallelize the converting hash table to two level process after finishing hash agg build #8957

Merged
merged 13 commits into from
Apr 25, 2024

Conversation

gengliqi
Copy link
Contributor

@gengliqi gengliqi commented Apr 17, 2024

What problem does this PR solve?

Issue Number: close #8956

Problem Summary:
See #8956.

What is changed and how it works?

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

Signed-off-by: gengliqi <[email protected]>
Signed-off-by: gengliqi <[email protected]>
Signed-off-by: gengliqi <[email protected]>
@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 Apr 17, 2024
@gengliqi gengliqi requested review from SeaRise and windtalker and removed request for SeaRise April 17, 2024 12:13
@gengliqi
Copy link
Contributor Author

/build

@gengliqi
Copy link
Contributor Author

/run-all-tests

@gengliqi
Copy link
Contributor Author

/run-all-tests

@@ -2455,14 +2460,55 @@ Block MergingBuckets::getData(size_t concurrency_index)
{
assert(concurrency_index < concurrency);

if (unlikely(data.empty()))
if unlikely (data.empty())
Copy link
Contributor

Choose a reason for hiding this comment

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

why removing the () outside of unlikely? 😂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just for simplicity😂

@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 Apr 19, 2024
Signed-off-by: gengliqi <[email protected]>
@gengliqi gengliqi force-pushed the parllel-agg-convert branch from 3a1dab7 to 6dbbbc3 Compare April 19, 2024 14:27
@gengliqi
Copy link
Contributor Author

/run-all-tests

@SeaRise SeaRise self-requested a review April 22, 2024 03:13
@gengliqi gengliqi requested a review from SeaRise April 23, 2024 06:36
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Apr 23, 2024
@gengliqi
Copy link
Contributor Author

/run-all-tests

@@ -77,6 +84,39 @@ void PhysicalAggregationBuild::buildPipelineExecGroupImpl(
EventPtr PhysicalAggregationBuild::doSinkComplete(PipelineExecutorContext & exec_context)
{
assert(aggregate_context);

SCOPE_EXIT({ aggregate_context.reset(); });
if (!aggregate_context->hasSpilledData())
Copy link
Contributor

Choose a reason for hiding this comment

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

This check should at least moved to after aggregate_context->getAggSpillContext()->finishSpillableStage(); How about move the whole code block after check AggregateFinalSpillEvent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@gengliqi
Copy link
Contributor Author

/run-all-tests

@gengliqi gengliqi requested a review from windtalker April 25, 2024 07:51
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 Apr 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SeaRise, 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:

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 Apr 25, 2024
Copy link
Contributor

ti-chi-bot bot commented Apr 25, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-23 06:42:50.223059154 +0000 UTC m=+69726.962962064: ☑️ agreed by SeaRise.
  • 2024-04-25 08:43:22.417702193 +0000 UTC m=+249759.157605105: ☑️ agreed by windtalker.

@gengliqi
Copy link
Contributor Author

/run-integration-test

@ti-chi-bot ti-chi-bot bot merged commit a239275 into pingcap:master Apr 25, 2024
6 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/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.

Parallelize the converting hash table to two level process after finishing hash agg build
4 participants