pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[fix][client] Fix retry logic for BinaryProtoLookupService.getTopicsUnderNamespace method

Open lhotari opened this issue 2 months ago • 1 comments

Motivation

BinaryProtoLookupService.getTopicsUnderNamespace method contains retry logic, but it only applies to exceptions that occur when acquiring the connection fails. A getTopicsUnderNamespace might fail later if the connection gets closed before the response has been successfully received. That's why it's better that the retry logic would also cover the actual operation to be effective.

Modifications

  • Fix the retry logic and add tests

Documentation

  • [ ] doc
  • [ ] doc-required
  • [x] doc-not-needed
  • [ ] doc-complete

lhotari avatar Nov 11 '25 14:11 lhotari

Codecov Report

:x: Patch coverage is 89.36170% with 5 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 74.28%. Comparing base (f29ca21) to head (b3ab4f0). :warning: Report is 20 commits behind head on master.

Files with missing lines Patch % Lines
...e/pulsar/client/impl/BinaryProtoLookupService.java 86.84% 2 Missing and 3 partials :warning:
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #24974       +/-   ##
=============================================
+ Coverage     38.69%   74.28%   +35.58%     
- Complexity    13362    34017    +20655     
=============================================
  Files          1863     1920       +57     
  Lines        145975   150236     +4261     
  Branches      16928    17428      +500     
=============================================
+ Hits          56487   111604    +55117     
+ Misses        81858    29719    -52139     
- Partials       7630     8913     +1283     
Flag Coverage Δ
inttests 26.32% <12.76%> (+0.03%) :arrow_up:
systests 22.86% <40.42%> (-0.01%) :arrow_down:
unittests 73.81% <89.36%> (+38.82%) :arrow_up:

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

Files with missing lines Coverage Δ
.../java/org/apache/pulsar/client/impl/ClientCnx.java 69.33% <100.00%> (+15.64%) :arrow_up:
...rg/apache/pulsar/client/impl/PulsarClientImpl.java 75.55% <100.00%> (+18.14%) :arrow_up:
...pache/pulsar/common/protocol/FrameDecoderUtil.java 100.00% <100.00%> (ø)
...e/pulsar/client/impl/BinaryProtoLookupService.java 83.39% <86.84%> (+12.41%) :arrow_up:

... and 1416 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov-commenter avatar Nov 11 '25 18:11 codecov-commenter