You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/05/16 17:42:44 UTC

[GitHub] [pinot] snleee opened a new pull request, #8711: Disable Groovy function by default

snleee opened a new pull request, #8711:
URL: https://github.com/apache/pinot/pull/8711

   This is the last step for #7966 to disable groovy function by default.
   
   Release Notes: We are disabling groovy function by default due to the potential security issues. To enable back the functionality, users can choose to use table-level config override or broker/controller config to turn it on globally.
   ```
   # Enable Groovy globally on Pinot broker
   pinot.broker.disable.query.groovy=false
   
   # Enable Groovy globally on Pinot controller
   controller.disable.ingestion.groovy=false
   
   # Table override
   {
     "tableName": "myTable",
     "tableType": "OFFLINE",
    
     "queryConfig" : {
       "disableGroovy": false
     }
   }
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] abhs50 commented on pull request #8711: Disable Groovy function by default

Posted by GitBox <gi...@apache.org>.
abhs50 commented on PR #8711:
URL: https://github.com/apache/pinot/pull/8711#issuecomment-1204482819

   Hello, Is there an ETA on when this fix will be released in latest version ? Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] snleee commented on a diff in pull request #8711: Disable Groovy function by default

Posted by GitBox <gi...@apache.org>.
snleee commented on code in PR #8711:
URL: https://github.com/apache/pinot/pull/8711#discussion_r874105775


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -1033,8 +1033,8 @@ private HandlerContext getHandlerContext(@Nullable TableConfig offlineTableConfi
       }
     }
 
-    // Disable Groovy if either offline or realtime table config disables Groovy
-    boolean disableGroovy = offlineTableDisableGroovyQuery | realtimeTableDisableGroovyQuery;
+    // Disable Groovy if both offline and realtime table config disable Groovy

Review Comment:
   I will improve this logic in that case. I was trying to handle `offline/ realtime only case`.
   
   We need an extra `null` check for the table configs.
   
   1. If both offline/realtime exists, allow if both got enabled.
   2. if only one exists, allow if the specific table got enabled.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] snleee commented on a diff in pull request #8711: Disable Groovy function by default

Posted by GitBox <gi...@apache.org>.
snleee commented on code in PR #8711:
URL: https://github.com/apache/pinot/pull/8711#discussion_r874246754


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -94,6 +94,7 @@ public abstract class BaseBrokerRequestHandler implements BrokerRequestHandler {
   private static final Logger LOGGER = LoggerFactory.getLogger(BaseBrokerRequestHandler.class);
   private static final String IN_SUBQUERY = "insubquery";
   private static final String IN_ID_SET = "inidset";
+  private static final boolean DEFAULT_DISABLE_GROOVY = true;

Review Comment:
   moved



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] snleee commented on a diff in pull request #8711: Disable Groovy function by default

Posted by GitBox <gi...@apache.org>.
snleee commented on code in PR #8711:
URL: https://github.com/apache/pinot/pull/8711#discussion_r874384761


##########
compatibility-verifier/sample-test-suite/config/ControllerConfig.properties:
##########
@@ -22,3 +22,4 @@ controller.port = 9000
 controller.zk.str = localhost:2181
 controller.data.dir = /tmp/PinotController
 controller.helix.cluster.name = PinotCluster
+controller.disable.ingestion.groovy = false

Review Comment:
   done
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] snleee merged pull request #8711: Disable Groovy function by default

Posted by GitBox <gi...@apache.org>.
snleee merged PR #8711:
URL: https://github.com/apache/pinot/pull/8711


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #8711: Disable Groovy function by default

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on code in PR #8711:
URL: https://github.com/apache/pinot/pull/8711#discussion_r874168340


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -94,6 +94,7 @@ public abstract class BaseBrokerRequestHandler implements BrokerRequestHandler {
   private static final Logger LOGGER = LoggerFactory.getLogger(BaseBrokerRequestHandler.class);
   private static final String IN_SUBQUERY = "insubquery";
   private static final String IN_ID_SET = "inidset";
+  private static final boolean DEFAULT_DISABLE_GROOVY = true;

Review Comment:
   Let's put this constant along with the `DISABLE_GROOVY` in `CommonConstants.Broker`



##########
pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java:
##########
@@ -867,7 +867,7 @@ public String getControllerResourcePackages() {
    * @return true if Groovy functions are disabled in controller config, otherwise returns false.
    */
   public boolean isDisableIngestionGroovy() {
-    return getProperty(DISABLE_GROOVY, false);
+    return getProperty(DISABLE_GROOVY, true);

Review Comment:
   Add a default constant for this



##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -1033,8 +1034,18 @@ private HandlerContext getHandlerContext(@Nullable TableConfig offlineTableConfi
       }
     }
 
-    // Disable Groovy if either offline or realtime table config disables Groovy
-    boolean disableGroovy = offlineTableDisableGroovyQuery | realtimeTableDisableGroovyQuery;
+    // Disable Groovy in the following cases:

Review Comment:
   Good findings. Actually `useApproximateFunction` has the same issue, and we can fix them all together.
   I feel it might be easier to read and understand if we separate the override from the default, and use override if exists:
   ```
     private HandlerContext getHandlerContext(@Nullable TableConfig offlineTableConfig,
         @Nullable TableConfig realtimeTableConfig) {
       Boolean disableGroovyOverride = null;
       Boolean useApproximateFunctionOverride = null;
       if (offlineTableConfig != null && offlineTableConfig.getQueryConfig() != null) {
         QueryConfig offlineTableQueryConfig = offlineTableConfig.getQueryConfig();
         Boolean disableGroovyOfflineTableOverride = offlineTableQueryConfig.getDisableGroovy();
         if (disableGroovyOfflineTableOverride != null) {
           disableGroovyOverride = disableGroovyOfflineTableOverride;
         }
         Boolean useApproximateFunctionOfflineTableOverride = offlineTableQueryConfig.getUseApproximateFunction();
         if (useApproximateFunctionOfflineTableOverride != null) {
           useApproximateFunctionOverride = useApproximateFunctionOfflineTableOverride;
         }
       }
       if (realtimeTableConfig != null && realtimeTableConfig.getQueryConfig() != null) {
         QueryConfig realtimeTableQueryCOnfig = realtimeTableConfig.getQueryConfig();
         Boolean disableGroovyRealtimeTableOverride = realtimeTableQueryCOnfig.getDisableGroovy();
         if (disableGroovyRealtimeTableOverride != null) {
           if (disableGroovyOverride == null) {
             disableGroovyOverride = disableGroovyRealtimeTableOverride;
           } else {
             // Disable Groovy if either offline or realtime table config disables Groovy
             disableGroovyOverride |= disableGroovyRealtimeTableOverride;
           }
         }
         Boolean useApproximateFunctionRealtimeTableOverride = realtimeTableQueryCOnfig.getUseApproximateFunction();
         if (useApproximateFunctionRealtimeTableOverride != null) {
           if (useApproximateFunctionOverride == null) {
             useApproximateFunctionOverride = useApproximateFunctionRealtimeTableOverride;
           } else {
             // Use approximate function if both offline and realtime table config uses approximate function
             useApproximateFunctionOverride &= useApproximateFunctionRealtimeTableOverride;
           }
         }
       }
   
       boolean disableGroovy = disableGroovyOverride != null ? disableGroovyOverride : _disableGroovy;
       boolean useApproximateFunction =
           useApproximateFunctionOverride != null ? useApproximateFunctionOverride : _useApproximateFunction;
       return new HandlerContext(disableGroovy, useApproximateFunction);
     }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] snleee commented on a diff in pull request #8711: Disable Groovy function by default

Posted by GitBox <gi...@apache.org>.
snleee commented on code in PR #8711:
URL: https://github.com/apache/pinot/pull/8711#discussion_r874246650


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -1033,8 +1034,18 @@ private HandlerContext getHandlerContext(@Nullable TableConfig offlineTableConfi
       }
     }
 
-    // Disable Groovy if either offline or realtime table config disables Groovy
-    boolean disableGroovy = offlineTableDisableGroovyQuery | realtimeTableDisableGroovyQuery;
+    // Disable Groovy in the following cases:

Review Comment:
   +1 the above approach is more readable.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang commented on pull request #8711: Disable Groovy function by default

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on PR #8711:
URL: https://github.com/apache/pinot/pull/8711#issuecomment-1204579133

   cc @atris Do we have an ETA for the 0.11.0 release?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] snleee commented on a diff in pull request #8711: Disable Groovy function by default

Posted by GitBox <gi...@apache.org>.
snleee commented on code in PR #8711:
URL: https://github.com/apache/pinot/pull/8711#discussion_r874241287


##########
pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java:
##########
@@ -867,7 +867,7 @@ public String getControllerResourcePackages() {
    * @return true if Groovy functions are disabled in controller config, otherwise returns false.
    */
   public boolean isDisableIngestionGroovy() {
-    return getProperty(DISABLE_GROOVY, false);
+    return getProperty(DISABLE_GROOVY, true);

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] codecov-commenter commented on pull request #8711: Disable Groovy function by default

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #8711:
URL: https://github.com/apache/pinot/pull/8711#issuecomment-1128279759

   # [Codecov](https://codecov.io/gh/apache/pinot/pull/8711?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#8711](https://codecov.io/gh/apache/pinot/pull/8711?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4d41f99) into [master](https://codecov.io/gh/apache/pinot/commit/f90137b1d5aa4bccd6c136e1200c9b9775960c77?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f90137b) will **decrease** coverage by `1.17%`.
   > The diff coverage is `66.66%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #8711      +/-   ##
   ============================================
   - Coverage     69.65%   68.48%   -1.18%     
   + Complexity     4571     4556      -15     
   ============================================
     Files          1720     1725       +5     
     Lines         89835    90089     +254     
     Branches      13333    13415      +82     
   ============================================
   - Hits          62574    61695     -879     
   - Misses        22940    24083    +1143     
   + Partials       4321     4311      -10     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | integration1 | `27.00% <66.66%> (-0.01%)` | :arrow_down: |
   | integration2 | `?` | |
   | unittests1 | `66.18% <ø> (+0.02%)` | :arrow_up: |
   | unittests2 | `14.28% <8.33%> (-0.06%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/pinot/pull/8711?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...va/org/apache/pinot/spi/utils/CommonConstants.java](https://codecov.io/gh/apache/pinot/pull/8711/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvdXRpbHMvQ29tbW9uQ29uc3RhbnRzLmphdmE=) | `21.31% <ø> (ø)` | |
   | [...roker/requesthandler/BaseBrokerRequestHandler.java](https://codecov.io/gh/apache/pinot/pull/8711/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtYnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9icm9rZXIvcmVxdWVzdGhhbmRsZXIvQmFzZUJyb2tlclJlcXVlc3RIYW5kbGVyLmphdmE=) | `66.81% <65.21%> (-3.45%)` | :arrow_down: |
   | [...va/org/apache/pinot/controller/ControllerConf.java](https://codecov.io/gh/apache/pinot/pull/8711/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29udHJvbGxlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29udHJvbGxlci9Db250cm9sbGVyQ29uZi5qYXZh) | `56.12% <100.00%> (-1.19%)` | :arrow_down: |
   | [...apache/pinot/common/helix/ExtraInstanceConfig.java](https://codecov.io/gh/apache/pinot/pull/8711/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vaGVsaXgvRXh0cmFJbnN0YW5jZUNvbmZpZy5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...t/core/plan/StreamingInstanceResponsePlanNode.java](https://codecov.io/gh/apache/pinot/pull/8711/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9wbGFuL1N0cmVhbWluZ0luc3RhbmNlUmVzcG9uc2VQbGFuTm9kZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ore/operator/streaming/StreamingResponseUtils.java](https://codecov.io/gh/apache/pinot/pull/8711/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9vcGVyYXRvci9zdHJlYW1pbmcvU3RyZWFtaW5nUmVzcG9uc2VVdGlscy5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ager/realtime/PeerSchemeSplitSegmentCommitter.java](https://codecov.io/gh/apache/pinot/pull/8711/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9kYXRhL21hbmFnZXIvcmVhbHRpbWUvUGVlclNjaGVtZVNwbGl0U2VnbWVudENvbW1pdHRlci5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ator/streaming/StreamingSelectionOnlyOperator.java](https://codecov.io/gh/apache/pinot/pull/8711/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9vcGVyYXRvci9zdHJlYW1pbmcvU3RyZWFtaW5nU2VsZWN0aW9uT25seU9wZXJhdG9yLmphdmE=) | `0.00% <0.00%> (-90.00%)` | :arrow_down: |
   | [...he/pinot/core/plan/StreamingSelectionPlanNode.java](https://codecov.io/gh/apache/pinot/pull/8711/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9wbGFuL1N0cmVhbWluZ1NlbGVjdGlvblBsYW5Ob2RlLmphdmE=) | `0.00% <0.00%> (-88.89%)` | :arrow_down: |
   | [...re/query/reduce/SelectionOnlyStreamingReducer.java](https://codecov.io/gh/apache/pinot/pull/8711/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9xdWVyeS9yZWR1Y2UvU2VsZWN0aW9uT25seVN0cmVhbWluZ1JlZHVjZXIuamF2YQ==) | `0.00% <0.00%> (-80.96%)` | :arrow_down: |
   | ... and [142 more](https://codecov.io/gh/apache/pinot/pull/8711/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/pinot/pull/8711?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/pinot/pull/8711?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f90137b...4d41f99](https://codecov.io/gh/apache/pinot/pull/8711?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #8711: Disable Groovy function by default

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on code in PR #8711:
URL: https://github.com/apache/pinot/pull/8711#discussion_r874265678


##########
compatibility-verifier/sample-test-suite/config/ControllerConfig.properties:
##########
@@ -22,3 +22,4 @@ controller.port = 9000
 controller.zk.str = localhost:2181
 controller.data.dir = /tmp/PinotController
 controller.helix.cluster.name = PinotCluster
+controller.disable.ingestion.groovy = false

Review Comment:
   (nit) empty line :-P



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] snleee commented on a diff in pull request #8711: Disable Groovy function by default

Posted by GitBox <gi...@apache.org>.
snleee commented on code in PR #8711:
URL: https://github.com/apache/pinot/pull/8711#discussion_r874117432


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -1033,8 +1033,8 @@ private HandlerContext getHandlerContext(@Nullable TableConfig offlineTableConfi
       }
     }
 
-    // Disable Groovy if either offline or realtime table config disables Groovy
-    boolean disableGroovy = offlineTableDisableGroovyQuery | realtimeTableDisableGroovyQuery;
+    // Disable Groovy if both offline and realtime table config disable Groovy

Review Comment:
   @Jackie-Jiang pls review the updated code.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] snleee commented on a diff in pull request #8711: Disable Groovy function by default

Posted by GitBox <gi...@apache.org>.
snleee commented on code in PR #8711:
URL: https://github.com/apache/pinot/pull/8711#discussion_r874117596


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -133,7 +133,7 @@ public BaseBrokerRequestHandler(PinotConfiguration config, BrokerRoutingManager
     _queryQuotaManager = queryQuotaManager;
     _tableCache = tableCache;
     _brokerMetrics = brokerMetrics;
-    _disableGroovy = _config.getProperty(CommonConstants.Broker.DISABLE_GROOVY, false);
+    _disableGroovy = _config.getProperty(CommonConstants.Broker.DISABLE_GROOVY, true);

Review Comment:
   added



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] snleee commented on a diff in pull request #8711: Disable Groovy function by default

Posted by GitBox <gi...@apache.org>.
snleee commented on code in PR #8711:
URL: https://github.com/apache/pinot/pull/8711#discussion_r874246650


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -1033,8 +1034,18 @@ private HandlerContext getHandlerContext(@Nullable TableConfig offlineTableConfi
       }
     }
 
-    // Disable Groovy if either offline or realtime table config disables Groovy
-    boolean disableGroovy = offlineTableDisableGroovyQuery | realtimeTableDisableGroovyQuery;
+    // Disable Groovy in the following cases:

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #8711: Disable Groovy function by default

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on code in PR #8711:
URL: https://github.com/apache/pinot/pull/8711#discussion_r874101509


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -133,7 +133,7 @@ public BaseBrokerRequestHandler(PinotConfiguration config, BrokerRoutingManager
     _queryQuotaManager = queryQuotaManager;
     _tableCache = tableCache;
     _brokerMetrics = brokerMetrics;
-    _disableGroovy = _config.getProperty(CommonConstants.Broker.DISABLE_GROOVY, false);
+    _disableGroovy = _config.getProperty(CommonConstants.Broker.DISABLE_GROOVY, true);

Review Comment:
   Suggest adding a constant for `DEFAULT_DISABLE_GROOVY`



##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -1033,8 +1033,8 @@ private HandlerContext getHandlerContext(@Nullable TableConfig offlineTableConfi
       }
     }
 
-    // Disable Groovy if either offline or realtime table config disables Groovy
-    boolean disableGroovy = offlineTableDisableGroovyQuery | realtimeTableDisableGroovyQuery;
+    // Disable Groovy if both offline and realtime table config disable Groovy

Review Comment:
   Why do we change this? We can only allow groovy when both offline and realtime table has it enabled



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org