Skip to content

Fix NPE in ServerGrpcChannelBackoffResetHandler#18139

Draft
timothy-e wants to merge 6 commits intoapache:masterfrom
timothy-e:timothye-null-check-in-backoffresethandler
Draft

Fix NPE in ServerGrpcChannelBackoffResetHandler#18139
timothy-e wants to merge 6 commits intoapache:masterfrom
timothy-e:timothye-null-check-in-backoffresethandler

Conversation

@timothy-e
Copy link
Copy Markdown
Contributor

@timothy-e timothy-e commented Apr 8, 2026

Pinot integration tests failed flakily with

java.lang.NullPointerException
	at org.apache.pinot.server.starter.helix.ServerGrpcChannelBackoffResetHandler.onInstanceConfigChange(ServerGrpcChannelBackoffResetHandler.java:90)
	at org.apache.helix.manager.zk.CallbackHandler.invoke(CallbackHandler.java:362)
	at org.apache.helix.manager.zk.CallbackHandler.reset(CallbackHandler.java:772)
	at org.apache.helix.manager.zk.ZKHelixManager.resetHandlers(ZKHelixManager.java:1195)
	at org.apache.helix.manager.zk.ZKHelixManager$1.run(ZKHelixManager.java:931)

getPathChanged can return null when the notification type is FINALIZE. This was originally present in the PR that introduced this file, but removed because it was accidentally viewed as redundant.

Also, add a defensive null check before using the pathChanged, since it isn't guaranteed that pathChanged will be non-null.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 8, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 63.11%. Comparing base (52554ab) to head (32468ce).
⚠️ Report is 12 commits behind head on master.

Files with missing lines Patch % Lines
...er/helix/ServerGrpcChannelBackoffResetHandler.java 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18139      +/-   ##
============================================
- Coverage     64.01%   63.11%   -0.90%     
  Complexity     1617     1617              
============================================
  Files          3192     3202      +10     
  Lines        193936   194724     +788     
  Branches      29937    30049     +112     
============================================
- Hits         124140   122900    -1240     
- Misses        59990    62078    +2088     
+ Partials       9806     9746      -60     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-11 63.06% <66.66%> (-0.89%) ⬇️
java-21 63.04% <66.66%> (-0.95%) ⬇️
temurin 63.11% <66.66%> (-0.90%) ⬇️
unittests 63.11% <66.66%> (-0.90%) ⬇️
unittests1 55.55% <ø> (-0.32%) ⬇️
unittests2 33.52% <66.66%> (-0.87%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

// Both require a full scan to rebuild _shuttingDownServers from the current cluster state.
NotificationContext.Type type = context.getType();
if (type == NotificationContext.Type.INIT || context.getIsChildChange()) {
String pathChanged = context.getPathChanged();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should dig deeper. Do you see a code path in Helix that can result in null pathChanges?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants