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

Adding table config overrides for disabling groovy #8196

Merged
merged 3 commits into from
Feb 17, 2022

Conversation

timsants
Copy link
Contributor

@timsants timsants commented Feb 12, 2022

Description

This PR adds a table config override for disabling Groovy in query and ingestion. This is a follow up to #8159. This PR introduces a new boolean config value in the queryConfig named disableGroovy. If it is not set, then it will use the disable Groovy query configs defined in the broker configs.

Note that this table override does not apply to ingestion Groovy functions given that the Groovy is defined within the table config as well.

Upgrade Notes

Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)

  • Yes (Please label as backward-incompat, and complete the section below on Release Notes)

Does this PR fix a zero-downtime upgrade introduced earlier?

  • Yes (Please label this as backward-incompat, and complete the section below on Release Notes)

Does this PR otherwise need attention when creating release notes? Things to consider:

  • New configuration options
  • Deprecation of configurations
  • Signature changes to public methods/interfaces
  • New plugins added or old plugins removed
  • [x ] Yes (Please label this PR as release-notes and complete the section on Release Notes)

Release Notes

Introduced new query config value disableGroovy which is a table config override for enabling/disable Groovy queries.

Documentation

Will update documentation after this is merged.

@timsants timsants force-pushed the groovy_table_override branch 3 times, most recently from 22f9f34 to 17880f6 Compare February 13, 2022 05:58
@timsants timsants marked this pull request as ready for review February 14, 2022 20:31
@codecov-commenter
Copy link

codecov-commenter commented Feb 14, 2022

Codecov Report

Merging #8196 (dd4c2e4) into master (8042408) will decrease coverage by 1.19%.
The diff coverage is 70.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #8196      +/-   ##
============================================
- Coverage     70.97%   69.77%   -1.20%     
- Complexity     4313     4314       +1     
============================================
  Files          1626     1626              
  Lines         84851    84943      +92     
  Branches      12790    12787       -3     
============================================
- Hits          60221    59273     -948     
- Misses        20496    21542    +1046     
+ Partials       4134     4128       -6     
Flag Coverage Δ
integration1 ?
integration2 27.52% <55.00%> (+0.08%) ⬆️
unittests1 67.38% <100.00%> (-0.02%) ⬇️
unittests2 14.10% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...roker/requesthandler/BaseBrokerRequestHandler.java 70.86% <64.70%> (-0.84%) ⬇️
...org/apache/pinot/spi/config/table/QueryConfig.java 85.71% <100.00%> (+5.71%) ⬆️
...pinot/minion/exception/TaskCancelledException.java 0.00% <0.00%> (-100.00%) ⬇️
...nverttorawindex/ConvertToRawIndexTaskExecutor.java 0.00% <0.00%> (-100.00%) ⬇️
...e/pinot/common/minion/MergeRollupTaskMetadata.java 0.00% <0.00%> (-94.74%) ⬇️
...plugin/segmentuploader/SegmentUploaderDefault.java 0.00% <0.00%> (-87.10%) ⬇️
.../transform/function/MapValueTransformFunction.java 0.00% <0.00%> (-85.30%) ⬇️
...ot/common/messages/RoutingTableRebuildMessage.java 0.00% <0.00%> (-81.82%) ⬇️
...verttorawindex/ConvertToRawIndexTaskGenerator.java 5.45% <0.00%> (-80.00%) ⬇️
...ache/pinot/common/lineage/SegmentLineageUtils.java 22.22% <0.00%> (-77.78%) ⬇️
... and 116 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8042408...dd4c2e4. Read the comment docs.

tableConfig.setQueryConfig(new QueryConfig(5L, Boolean.TRUE));
updateTableConfig(tableConfig);

reloadOfflineTable(getTableName());
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need to reload the table because that won't update the table config on broker, which is ZK watcher based. We can keep sending queries using TestUtils.waitForCondition() until the query fails.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the waitForCondition but for some reason the testDistinctCountHll test is flaky when I remove the reload. Any ideas why this is happening?

@@ -37,14 +37,27 @@
// because by the time the server times out, the broker should already timed out and returned the response.
private final Long _timeoutMs;

// Table config override for disable Groovy broker property
private final Boolean _disableGroovy;
Copy link
Contributor

Choose a reason for hiding this comment

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

According to #7966, it looks that we would eventually want to disable Groovy by default. What's our plan on changing the default behavior?

Copy link
Contributor

Choose a reason for hiding this comment

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

This PR is backward compatible. We can probably submit a separate small backward incompatible PR to simply change the default value for it

@Jackie-Jiang Jackie-Jiang added the release-notes Referenced by PRs that need attention when compiling the next release notes label Feb 17, 2022
@Jackie-Jiang Jackie-Jiang merged commit 582d621 into apache:master Feb 17, 2022
@Jackie-Jiang Jackie-Jiang deleted the groovy_table_override branch February 17, 2022 23:20
xiangfu0 pushed a commit to xiangfu0/pinot that referenced this pull request Feb 23, 2022
Introduced new query config value `disableGroovy` which is a table config override for enabling/disable Groovy queries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes Referenced by PRs that need attention when compiling the next release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants