pinot icon indicating copy to clipboard operation
pinot copied to clipboard

Improve exception handling in ControllerLeaderLocator

Open Akanksha-kedia opened this issue 3 months ago • 2 comments

This is in the convertToHostAndPortPair method which is responsible for parsing instance IDs like "localhost_9000" into hostname and port pairs. The current implementation has poor exception handling and could fail with NumberFormatException or StringIndexOutOfBoundsException if the instanceId format is invalid.

Akanksha-kedia avatar Dec 13 '25 14:12 Akanksha-kedia

@xiangfu0 @Jackie-Jiang please help to review and merge

Akanksha-kedia avatar Dec 13 '25 14:12 Akanksha-kedia

Codecov Report

:x: Patch coverage is 30.43478% with 16 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 63.23%. Comparing base (3be9fbe) to head (7734eb3). :warning: Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
...pinot/server/realtime/ControllerLeaderLocator.java 30.43% 12 Missing and 4 partials :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17366      +/-   ##
============================================
- Coverage     63.28%   63.23%   -0.06%     
  Complexity     1474     1474              
============================================
  Files          3147     3152       +5     
  Lines        187576   187888     +312     
  Branches      28712    28765      +53     
============================================
+ Hits         118712   118815     +103     
- Misses        59663    59848     +185     
- Partials       9201     9225      +24     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-11 63.20% <30.43%> (-0.01%) :arrow_down:
java-21 63.19% <30.43%> (-0.04%) :arrow_down:
temurin 63.23% <30.43%> (-0.06%) :arrow_down:
unittests 63.23% <30.43%> (-0.06%) :arrow_down:
unittests1 55.66% <30.43%> (+<0.01%) :arrow_up:
unittests2 33.88% <0.00%> (-0.05%) :arrow_down:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov-commenter avatar Dec 13 '25 15:12 codecov-commenter

Please check why the tests are failing

Jackie-Jiang avatar Dec 19 '25 23:12 Jackie-Jiang

Please check why the tests are failing

@Jackie-Jiang please review its resolved.

Akanksha-kedia avatar Dec 21 '25 08:12 Akanksha-kedia

@xiangfu0 please review i have resolved.

Akanksha-kedia avatar Jan 04 '26 14:01 Akanksha-kedia

@xiangfu0

Akanksha-kedia avatar Jan 06 '26 09:01 Akanksha-kedia