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] fix pulsar-admin topics stats-internal caused a BK client thread a deadlock #23258

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

poorbarcode
Copy link
Contributor

@poorbarcode poorbarcode commented Sep 5, 2024

Motivation

pulsar-admin topics stats-internal caused a BK client thread deadlock, leading to other ledgers not being opened successfully, and topics not being loaded up.

A race condition that will trigger the issue

  • Calling topics stats-internal
  • Compaction is running at the last step(opening a new ledger to write)
Screenshot 2024-09-05 at 12 13 55

Modifications

  • Remove sync call

Documentation

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

Matching PR in forked repository

PR in forked repository: x

@poorbarcode poorbarcode added type/bug The PR fixed a bug or issue reported a bug release/3.0.7 release/3.3.2 labels Sep 5, 2024
@poorbarcode poorbarcode added this to the 4.0.0 milestone Sep 5, 2024
@poorbarcode poorbarcode self-assigned this Sep 5, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Sep 5, 2024
@nodece nodece changed the title [fix] [broker] fix pulsar-admin topics stats-internal caused a BK client thread a deadlock [fix][broker] fix pulsar-admin topics stats-internal caused a BK client thread a deadlock Sep 5, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 74.50%. Comparing base (bbc6224) to head (500df6e).
Report is 568 commits behind head on master.

Files with missing lines Patch % Lines
...sar/broker/service/persistent/PersistentTopic.java 78.57% 2 Missing and 1 partial ⚠️
...g/apache/pulsar/compaction/CompactedTopicImpl.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23258      +/-   ##
============================================
+ Coverage     73.57%   74.50%   +0.92%     
- Complexity    32624    33755    +1131     
============================================
  Files          1877     1926      +49     
  Lines        139502   145064    +5562     
  Branches      15299    15864     +565     
============================================
+ Hits         102638   108078    +5440     
+ Misses        28908    28705     -203     
- Partials       7956     8281     +325     
Flag Coverage Δ
inttests 27.90% <31.25%> (+3.32%) ⬆️
systests 24.64% <31.25%> (+0.31%) ⬆️
unittests 73.84% <75.00%> (+1.00%) ⬆️

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

Files with missing lines Coverage Δ
...g/apache/pulsar/compaction/CompactedTopicImpl.java 62.06% <50.00%> (-0.36%) ⬇️
...sar/broker/service/persistent/PersistentTopic.java 78.90% <78.57%> (+0.44%) ⬆️

... and 559 files with indirect coverage changes

@poorbarcode poorbarcode requested review from nodece and removed request for nodece September 9, 2024 12:01
@nodece nodece merged commit 0aaa906 into apache:master Sep 9, 2024
51 checks passed
poorbarcode added a commit that referenced this pull request Sep 10, 2024
…nt thread a deadlock (#23258)

(cherry picked from commit 0aaa906)
poorbarcode added a commit that referenced this pull request Sep 10, 2024
…nt thread a deadlock (#23258)

(cherry picked from commit 0aaa906)
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Sep 10, 2024
…nt thread a deadlock (apache#23258)

(cherry picked from commit 0aaa906)
(cherry picked from commit f5737e6)
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Sep 10, 2024
…nt thread a deadlock (apache#23258)

(cherry picked from commit 0aaa906)
(cherry picked from commit f5737e6)
michalcukierman pushed a commit to michalcukierman/pulsar that referenced this pull request Sep 11, 2024
poorbarcode added a commit that referenced this pull request Sep 14, 2024
…nt thread a deadlock (#23258)

(cherry picked from commit 0aaa906)
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Sep 19, 2024
…nt thread a deadlock (apache#23258)

(cherry picked from commit 0aaa906)
(cherry picked from commit f5737e6)
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