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

Send dynamic filters from coordinator to workers #5183

Merged
merged 5 commits into from Jul 9, 2021

Conversation

raunaqmorarka
Copy link
Member

@raunaqmorarka raunaqmorarka commented Sep 16, 2020

Fixes #3972

@cla-bot cla-bot bot added the cla-signed label Sep 16, 2020
@sopel39
Copy link
Member

sopel39 commented Apr 14, 2021

This also requires:

  1. a feature toggle since now coordinator could broadcast more data
  2. stats to track request sizes (see: io.trino.server.remotetask.RemoteTaskStats#updateWithPlanBytes) and possibly others

Regarding #5183 (comment), I'm leaning towards sending DF updates via TaskUpdateRequest only (without dedicated service), but it would be good to get second opinion from @dain about it.

@raunaqmorarka raunaqmorarka force-pushed the df_stripe branch 6 times, most recently from 1f1651f to 0d122bd Compare June 23, 2021 14:45
@raunaqmorarka raunaqmorarka changed the title [WIP] Send dynamic filters from coordinator to workers Send dynamic filters from coordinator to workers Jun 23, 2021
@@ -167,6 +174,12 @@ private SqlStageExecution(
}
}
this.exchangeSources = fragmentToExchangeSource.build();
if (distributeDynamicFilters) {
Copy link
Member

Choose a reason for hiding this comment

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

Don't we need to check if DF are enabled in general too?

Copy link
Member Author

Choose a reason for hiding this comment

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

If DF is disabled, then the plan won't have any DFs and getOutboundDynamicFilters should come back empty

@raunaqmorarka raunaqmorarka force-pushed the df_stripe branch 2 times, most recently from f9c5234 to 37b451c Compare July 2, 2021 08:11
@@ -520,7 +520,8 @@ private synchronized void sendUpdate()
}
Copy link
Member

Choose a reason for hiding this comment

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

nit: would it be possible to add test to TestHttpRemoteTask?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added some testing around sending of DFs in TestHttpRemoteTask
I didn't see a reasonable way to test the race condition though

Copy link
Member

@sopel39 sopel39 left a comment

Choose a reason for hiding this comment

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

lgtm % test comments

@raunaqmorarka raunaqmorarka force-pushed the df_stripe branch 3 times, most recently from 115618f to ace437b Compare July 2, 2021 16:17
@raunaqmorarka raunaqmorarka force-pushed the df_stripe branch 2 times, most recently from d70f0c4 to 0dbd119 Compare July 5, 2021 09:00
Copy link
Member

@sopel39 sopel39 left a comment

Choose a reason for hiding this comment

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

lgtm % test comments

Copy link
Member

@sopel39 sopel39 left a comment

Choose a reason for hiding this comment

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

small comments

Explicitly disable optimizer.rewrite-filtering-semi-join-to-inner-join
in dynamic filtering tests to ensure that the semi-join related
tests actually test the code path of semi-join dynamic filtering.
@sopel39 sopel39 merged commit 7854abc into trinodb:master Jul 9, 2021
@sopel39 sopel39 mentioned this pull request Jul 9, 2021
11 tasks
@raunaqmorarka raunaqmorarka deleted the df_stripe branch July 9, 2021 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Pass dynamic filters back to workers from coordinator
2 participants