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

[improve][broker] Add an error log to troubleshoot the failure of starting broker registry. #22065

Merged
merged 2 commits into from
Feb 18, 2024

Conversation

liangyepianzhou
Copy link
Contributor

Motivation

When the ExtensibleLoadManagerImpl.java fails to start, it will close brokerRegistry. But we cannot directly determine why the broker register is closed.

2024-02-15T20:09:18,675+0000 [main] ERROR org.apache.pulsar.broker.namespace.NamespaceService - java.lang.IllegalStateException: The registry already closed.
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: The registry already closed.
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) ~[?:?]
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073) ~[?:?]
	at org.apache.pulsar.broker.namespace.NamespaceService.registerNamespace(NamespaceService.java:380) ~[io.streamnative-pulsar-broker-3.1.2.1.jar:3.1.2.1]
	at org.apache.pulsar.broker.namespace.NamespaceService.registerBootstrapNamespaces(NamespaceService.java:343) ~[io.streamnative-pulsar-broker-3.1.2.1.jar:3.1.2.1]
	at org.apache.pulsar.broker.PulsarService.start(PulsarService.java:867) ~[io.streamnative-pulsar-broker-3.1.2.1.jar:3.1.2.1]
	at org.apache.pulsar.PulsarBrokerStarter$BrokerStarter.start(PulsarBrokerStarter.java:276) ~[io.streamnative-pulsar-broker-3.1.2.1.jar:3.1.2.1]
	at org.apache.pulsar.PulsarBrokerStarter.main(PulsarBrokerStarter.java:356) ~[io.streamnative-pulsar-broker-3.1.2.1.jar:3.1.2.1]
Caused by: java.lang.IllegalStateException: The registry already closed.

Modifications

Add an error log when the ExtensibleLoadManagerImpl.java fails to start,

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

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

Matching PR in forked repository

PR in forked repository:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Feb 18, 2024
@liangyepianzhou liangyepianzhou self-assigned this Feb 18, 2024
Copy link
Member

@Demogorgon314 Demogorgon314 left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (a702e5a) 73.48% compared to head (aef87f1) 73.57%.
Report is 17 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #22065      +/-   ##
============================================
+ Coverage     73.48%   73.57%   +0.09%     
- Complexity    32465    32553      +88     
============================================
  Files          1863     1874      +11     
  Lines        138812   139221     +409     
  Branches      15215    15260      +45     
============================================
+ Hits         102003   102433     +430     
+ Misses        28921    28869      -52     
- Partials       7888     7919      +31     
Flag Coverage Δ
inttests 24.66% <0.00%> (?)
systests 24.28% <0.00%> (+0.38%) ⬆️
unittests 72.85% <0.00%> (-0.02%) ⬇️

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

Files Coverage Δ
...dbalance/extensions/ExtensibleLoadManagerImpl.java 78.07% <0.00%> (-1.50%) ⬇️

... and 106 files with indirect coverage changes

@nodece nodece merged commit baddda5 into apache:master Feb 18, 2024
50 checks passed
@liangyepianzhou liangyepianzhou deleted the logs/brokerRegistry branch February 18, 2024 05:02
heesung-sn pushed a commit that referenced this pull request Feb 28, 2024
…rting broker registry. (#22065)

(cherry picked from commit baddda5)
heesung-sn pushed a commit that referenced this pull request Feb 28, 2024
…rting broker registry. (#22065)

(cherry picked from commit baddda5)
heesung-sn pushed a commit that referenced this pull request Feb 28, 2024
…rting broker registry. (#22065)

(cherry picked from commit baddda5)
@heesung-sn heesung-sn added this to the 3.3.0 milestone Feb 28, 2024
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Mar 1, 2024
…rting broker registry. (apache#22065)

(cherry picked from commit baddda5)
(cherry picked from commit 71022f5)
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Mar 6, 2024
…rting broker registry. (apache#22065)

(cherry picked from commit baddda5)
(cherry picked from commit 71022f5)
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.

7 participants