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

Add toggle for specifying dynamic filtering refresh interval #4388

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

sopel39
Copy link
Member

@sopel39 sopel39 commented Jul 8, 2020

Previously, dynamic filtering refresh interval was set to
"task.status-refresh-max-wait". However, task status will be
refreshed more frequently since "task.status-refresh-max-wait"
specifies max wait. Therefore a dedicated refresh toggle is added.
This toggle is marked as experimental as it will eventually be replaced by
delta-based task status update mechanism.

@sopel39 sopel39 requested review from martint and raunaqmorarka July 8, 2020 12:36
@cla-bot cla-bot bot added the cla-signed label Jul 8, 2020
Copy link
Member

@losipiuk losipiuk left a comment

Choose a reason for hiding this comment

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

Not sure what is the config parameters deprecation policy. E.g If plan to remove it soon anyway should we maybe already mark it as @deprecated?

Also I was not able to understand motivation for the change based on commit message :)

@sopel39 sopel39 force-pushed the ks/dyn_filtering_toggle branch from a1a2fe2 to 4fcca0c Compare July 9, 2020 09:35
@sopel39
Copy link
Member Author

sopel39 commented Jul 9, 2020

Not sure what is the config parameters deprecation policy. E.g If plan to remove it soon anyway should we maybe already mark it as @deprecated?

I think @experimental fits the toggle more. Note that experimental toggles might still be removed. IMO @deprecated is for long preexisting toggles which reach end of life.

Also I was not able to understand motivation for the change based on commit message :)

I've improved it slightly

@sopel39 sopel39 requested a review from losipiuk July 9, 2020 19:33
Copy link
Member

@losipiuk losipiuk left a comment

Choose a reason for hiding this comment

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

Code wise it looks good. I would prefer extra pair of eyes on property name. @electrum ?

@@ -786,6 +790,21 @@ public FeaturesConfig setDynamicFilteringMaxPerDriverSize(DataSize dynamicFilter
return this;
}

@MinDuration("1ms")
@MaxDuration("10s")
Copy link
Member

Choose a reason for hiding this comment

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

Nit: testcase for validation?

@@ -131,6 +134,7 @@
private boolean enableDynamicFiltering = true;
private int dynamicFilteringMaxPerDriverRowCount = 100;
private DataSize dynamicFilteringMaxPerDriverSize = DataSize.of(10, KILOBYTE);
private Duration dynamicFilteringRefreshInterval = new Duration(100, MILLISECONDS);
Copy link
Member

Choose a reason for hiding this comment

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

What was the default previously? Arent we changing rate too aggressively?

Copy link
Member

Choose a reason for hiding this comment

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

The earlier default was 1 sec. It might be worth checking the time taken by collectDynamicFilters when there are large no. of queries active with multiple stages containing dynamic filters.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've changed it to 200ms. I don't think it's too aggressive. Anyway, it's limited to single thread.

@sopel39 sopel39 force-pushed the ks/dyn_filtering_toggle branch from 4fcca0c to 002f1a5 Compare July 27, 2020 12:27
Previously, dynamic filtering refresh interval was set to
"task.status-refresh-max-wait". However, task status will be
refreshed more frequently since "task.status-refresh-max-wait"
specifies maximum waiting time. Therefore a dedicated refresh
toggle is added that makes dynamic filtering collection more
frequent. This toggle is marked as experimental as it will
eventually be replaced by delta-based task status update mechanism.
@sopel39 sopel39 force-pushed the ks/dyn_filtering_toggle branch from 002f1a5 to 44d2fef Compare July 27, 2020 14:24
@sopel39 sopel39 merged commit e6c960e into trinodb:master Jul 27, 2020
@sopel39 sopel39 deleted the ks/dyn_filtering_toggle branch July 27, 2020 15:40
@sopel39 sopel39 mentioned this pull request Jul 27, 2020
8 tasks
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.

3 participants