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] log sessionId with zk-session-watcher for debugging #18291

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

rdhabalia
Copy link
Contributor

@rdhabalia rdhabalia commented Nov 1, 2022

Motivation

Right now, zk-quorum recovers after leader restart within zk-session-timeout but still it can cause restart for some brokers even if it's not expected. It's really helpful if zk-session-watcher also prints session-id if it has been changed while disconnecting so, it can help admin to configure right synclimit at zk-server configuration or doing additional debugging.

Modifications

Printing sessionId when zk is disconnecting.

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
  • Anything that affects deployment

Documentation

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

Matching PR in forked repository

PR in forked repository:

@rdhabalia rdhabalia added this to the 2.11.0 milestone Nov 1, 2022
@rdhabalia rdhabalia self-assigned this Nov 1, 2022
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Nov 1, 2022
@rdhabalia rdhabalia changed the title [logging][broker] log sessionId with zk-session-watcher for debugging [improve][broker] log sessionId with zk-session-watcher for debugging Nov 1, 2022
@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2022

Codecov Report

Merging #18291 (89fb565) into master (0866c3a) will increase coverage by 10.75%.
The diff coverage is 36.66%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #18291       +/-   ##
=============================================
+ Coverage     38.97%   49.72%   +10.75%     
+ Complexity     8311     7065     -1246     
=============================================
  Files           683      400      -283     
  Lines         67325    43624    -23701     
  Branches       7217     4476     -2741     
=============================================
- Hits          26239    21694     -4545     
+ Misses        38079    19500    -18579     
+ Partials       3007     2430      -577     
Flag Coverage Δ
unittests 49.72% <36.66%> (+10.75%) ⬆️

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

Impacted Files Coverage Δ
.../main/java/org/apache/pulsar/PulsarStandalone.java 0.00% <ø> (ø)
...rg/apache/pulsar/broker/service/BrokerService.java 56.05% <0.00%> (-1.88%) ⬇️
...pulsar/broker/service/PulsarCommandSenderImpl.java 62.30% <ø> (-12.06%) ⬇️
...apache/pulsar/broker/service/TopicListService.java 10.65% <0.00%> (-44.27%) ⬇️
...ransaction/buffer/impl/InMemTransactionBuffer.java 0.00% <ø> (ø)
...nsaction/buffer/impl/TransactionBufferDisable.java 52.63% <ø> (ø)
.../metadata/v2/TransactionBufferSnapshotIndexes.java 0.00% <0.00%> (ø)
...a/v2/TransactionBufferSnapshotIndexesMetadata.java 0.00% <0.00%> (ø)
...oker/transaction/buffer/metadata/v2/TxnIDData.java 0.00% <0.00%> (ø)
...ransaction/buffer/impl/TopicTransactionBuffer.java 41.56% <32.14%> (-2.83%) ⬇️
... and 352 more

@rdhabalia rdhabalia merged commit 987e0da into apache:master Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants