Skip to content

Conversation

@lhotari
Copy link
Member

@lhotari lhotari commented Oct 8, 2025

Motivation

When getPendingQueueSize is called for stats returned from a multi-topics producer, it will result in NPE

Modifications

  • add a null check to avoid NPE
  • implement aggregation for getPendingQueueSize

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@lhotari lhotari force-pushed the lh-fix-possible-npe-with-partitioned-topic-stats branch from 60d21b7 to 1c1ae9c Compare October 8, 2025 14:27
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.22%. Comparing base (4457b08) to head (2619854).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #24830       +/-   ##
=============================================
+ Coverage     38.39%   74.22%   +35.83%     
- Complexity    13123    33405    +20282     
=============================================
  Files          1856     1913       +57     
  Lines        145015   149181     +4166     
  Branches      16818    17304      +486     
=============================================
+ Hits          55684   110737    +55053     
+ Misses        81787    29607    -52180     
- Partials       7544     8837     +1293     
Flag Coverage Δ
inttests 26.41% <0.00%> (+0.10%) ⬆️
systests 22.75% <0.00%> (-0.01%) ⬇️
unittests 73.77% <100.00%> (+39.22%) ⬆️

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

Files with missing lines Coverage Δ
...mpl/PartitionedTopicProducerStatsRecorderImpl.java 100.00% <100.00%> (+63.63%) ⬆️
.../pulsar/client/impl/ProducerStatsRecorderImpl.java 91.35% <100.00%> (+19.75%) ⬆️

... and 1415 files with indirect coverage changes

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

@lhotari lhotari merged commit a43762b into apache:master Oct 10, 2025
139 of 145 checks passed
lhotari added a commit that referenced this pull request Oct 10, 2025
…tsRecorderImpl: avoid NPE and implement aggregation (#24830)

Co-authored-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit a43762b)
lhotari added a commit that referenced this pull request Oct 10, 2025
…tsRecorderImpl: avoid NPE and implement aggregation (#24830)

Co-authored-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit a43762b)
lhotari added a commit that referenced this pull request Oct 10, 2025
…tsRecorderImpl: avoid NPE and implement aggregation (#24830)

Co-authored-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit a43762b)
manas-ctds pushed a commit to datastax/pulsar that referenced this pull request Oct 15, 2025
…tsRecorderImpl: avoid NPE and implement aggregation (apache#24830)

Co-authored-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit a43762b)
(cherry picked from commit f758244)
manas-ctds pushed a commit to datastax/pulsar that referenced this pull request Oct 15, 2025
…tsRecorderImpl: avoid NPE and implement aggregation (apache#24830)

Co-authored-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit a43762b)
(cherry picked from commit 18323a9)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Oct 30, 2025
…tsRecorderImpl: avoid NPE and implement aggregation (apache#24830)

Co-authored-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit a43762b)
(cherry picked from commit f758244)
nodece added a commit to ascentstream/pulsar that referenced this pull request Oct 30, 2025
…tsRecorderImpl: avoid NPE and implement aggregation (apache#24830)

Co-authored-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit a43762b)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Nov 6, 2025
…tsRecorderImpl: avoid NPE and implement aggregation (apache#24830)

Co-authored-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit a43762b)
(cherry picked from commit 18323a9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants