-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 broker level config for disabling Pinot queries with Groovy #8159
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
Outdated
Show resolved
Hide resolved
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
Outdated
Show resolved
Hide resolved
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #8159 +/- ##
=============================================
+ Coverage 30.67% 70.20% +39.53%
- Complexity 0 4302 +4302
=============================================
Files 1612 1623 +11
Lines 83962 84350 +388
Branches 12602 12652 +50
=============================================
+ Hits 25754 59217 +33463
+ Misses 55919 21038 -34881
- Partials 2289 4095 +1806
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
36fc247
to
cc4e0af
Compare
This will scan each and every statement when DISABLE_GRROVY option is enabled. I am wondering if there is a more efficient option like doing a check while invoking groovy function whether it is disabled for SQL statements or not? I don't think there is an issue with groovy function being called during ingestion so that can be ignored. |
@amrishlal It is done on a per query basis on the broker side, which should be fine. We already have multiple similar operations on the broker (e.g. fixing column name, override hll etc,), and so far no obvious performance hit, so I wouldn't worry too much about that. |
7ee3ed4
to
929f966
Compare
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
Outdated
Show resolved
Hide resolved
…ler/BaseBrokerRequestHandler.java Co-authored-by: Xiaotian (Jackie) Jiang <[email protected]>
24e636f
to
1dfa1b0
Compare
Description
This change adds a broker config for disabling Groovy in Pinot queries as it is a security risk. See Github issue #7966. By default, Groovy is allowed for backwards compatibility to not break existing use cases which currently use Groovy.
Testing
Added unit tests and tested config with quick-start config override.
Upgrade Notes
Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)
backward-incompat
, and complete the section below on Release Notes)Does this PR fix a zero-downtime upgrade introduced earlier?
backward-incompat
, and complete the section below on Release Notes)Does this PR otherwise need attention when creating release notes? Things to consider:
release-notes
and complete the section on Release Notes)Release Notes
Introduced new config for disabling Groovy in queries:
pinot.broker.disable.query.groovy
. If not defined, defaults tofalse
.