xiangfu0 opened a new pull request, #19888: URL: https://github.com/apache/pinot/pull/19888
Servers and minions need a live cluster setting for the Groovy compiler gate. This reads `pinot.groovy.compilation.enabled` from the raw cluster configuration before runtime startup and follows later changes through the existing Helix cluster-config listener. Stacked on #19887; merge that PR first. The final commit contains this PR's seven-file change. The [cluster-config-only comparison](https://github.com/xiangfu0/pinot/compare/xiangfu0%2Fcodex2%2Fgroovy-runtime-compiler...xiangfu0%2Fcodex2%2Fgroovy-cluster-config) excludes the compiler dependency. ## Behavior and upgrade - Missing, deleted, invalid, or `false` values disable new Groovy evaluator/query compilation in server and minion JVMs. Only `true` enables it. - Cluster configuration is authoritative; instance properties do not override it. - New compilation is blocked at the compiler entry points. Already compiled scripts continue executing, and a compilation already admitted when the setting changes may finish. - Runtime startup disables compilation and fails if it cannot subscribe to cluster-config updates. **Before upgrading a cluster that uses Groovy, set the cluster key to `true`.** The new default is disabled on servers/minions. Existing controller and broker admission checks must also permit the submitted Groovy. The compiler switch is process-wide. A quickstart that colocates roles in one JVM shares that switch; standalone tools running in their own JVM retain their existing behavior. The shared integration-cluster fixture explicitly opts in before starting runtime roles. ## Usage Enable through the existing controller cluster-config API before starting/upgrading runtime roles: ```sh curl -X POST http://localhost:9000/cluster/configs \ -H 'Content-Type: application/json' \ -d '{"pinot.groovy.compilation.enabled":"true"}' ``` To block subsequent compilation on running servers/minions, send the same request with `false`, or remove the key: ```sh curl -X DELETE http://localhost:9000/cluster/configs/pinot.groovy.compilation.enabled ``` ## Validation - Three focused tests exercise real ZooKeeper startup reads, runtime-role-only application, instance override rejection, live enable/disable, invalid values, and removal before the first live callback. - The compiler, query-transform, and expression-transform regression tests pass with the new wiring. - Affected-module formatting, Checkstyle, license-format, license checks, and compilation with warning/deprecation reporting pass. Controller schema admission remains the separate concern of #19235. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
