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][broker] Handle the case when getOwnedServiceUnits fails gracefully #23119

Conversation

Demogorgon314
Copy link
Member

Motivation

When getOwnedServiceUnits fails, the broker will fail to start, we should handle getOwnedServiceUnits fails gracefully

org.apache.pulsar.broker.PulsarServerException: java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "org.apache.pulsar.client.api.TableView.entrySet()" because "this.tableview" is null
    at org.apache.pulsar.broker.PulsarService.start(PulsarService.java:993)

Modifications

  • Handle getOwnedServiceUnits fails gracefully
  • Fix NPE caused by ServiceUnitStateChannel's tableview is null.

Documentation

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

@Demogorgon314 Demogorgon314 added type/bug The PR fixed a bug or issue reported a bug area/broker labels Aug 2, 2024
@Demogorgon314 Demogorgon314 self-assigned this Aug 2, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Aug 2, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.46%. Comparing base (bbc6224) to head (c9e1ea3).
Report is 491 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23119      +/-   ##
============================================
- Coverage     73.57%   73.46%   -0.11%     
- Complexity    32624    33544     +920     
============================================
  Files          1877     1919      +42     
  Lines        139502   144125    +4623     
  Branches      15299    15748     +449     
============================================
+ Hits         102638   105886    +3248     
- Misses        28908    30118    +1210     
- Partials       7956     8121     +165     
Flag Coverage Δ
inttests 27.60% <25.00%> (+3.01%) ⬆️
systests 24.71% <25.00%> (+0.38%) ⬆️
unittests 72.54% <100.00%> (-0.31%) ⬇️

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

Files Coverage Δ
...xtensions/channel/ServiceUnitStateChannelImpl.java 86.42% <100.00%> (+1.11%) ⬆️
...ache/pulsar/broker/namespace/NamespaceService.java 74.21% <100.00%> (+1.97%) ⬆️

... and 522 files with indirect coverage changes

@BewareMyPower BewareMyPower merged commit 4a44f45 into apache:master Aug 6, 2024
56 checks passed
@Technoboy- Technoboy- added this to the 3.4.0 milestone Aug 6, 2024
lhotari pushed a commit that referenced this pull request Aug 6, 2024
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Aug 8, 2024
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Aug 12, 2024
lhotari pushed a commit that referenced this pull request Aug 16, 2024
Denovo1998 pushed a commit to Denovo1998/pulsar that referenced this pull request Aug 17, 2024
grssam pushed a commit to grssam/pulsar that referenced this pull request Sep 4, 2024
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.

6 participants