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

Fix NPE caused by MultiStageQueryThrottler #14805

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

jackjlli
Copy link
Member

@jackjlli jackjlli commented Jan 14, 2025

This PR fixes the NPE which is caused by MultiStageQueryThrottler being null when multi-stage engine feature is disabled.

To be more specific, when the multi-stage engine is disabled, the MultiStageQueryThrottler reference will be null. This makes the ClusterChangeMediator fail to process cluster changes like cluster config changes and external view changes.

if (_brokerConf.getProperty(Helix.CONFIG_OF_MULTI_STAGE_ENGINE_ENABLED, Helix.DEFAULT_MULTI_STAGE_ENGINE_ENABLED)) {

Sample error messages:

2025/01/09 19:43:44.610 ERROR [ClusterChangeMediator] [ClusterChangeHandlingThread] [pinot-broker] [] Caught exception within cluster change handling thread
java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "changeHandler" is null
        at org.apache.pinot.broker.broker.helix.ClusterChangeMediator.processClusterChange(ClusterChangeMediator.java:134) ~[org.apache.pinot.pinot-broker-1.3.0-dev-1461.jar:...]
        at org.apache.pinot.broker.broker.helix.ClusterChangeMediator.lambda$new$0(ClusterChangeMediator.java:98) ~[org.apache.pinot.pinot-broker-1.3.0-dev-1461.jar:...]
        at java.lang.Thread.run(Thread.java:833) [?:?]

@jackjlli jackjlli merged commit 25d17da into master Jan 14, 2025
21 checks passed
@jackjlli jackjlli deleted the fix-multiStageQueryThrottler-npe branch January 14, 2025 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants