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] Remove blocking calls from internalGetPartitionedStats #23832

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

nodece
Copy link
Member

@nodece nodece commented Jan 9, 2025

Motivation

The metadata-store thread is blocked in the Pulsar 3.0.x:

"metadata-store-11-1" #18 prio=5 os_prio=0 cpu=191.70ms elapsed=92.64s tid=0x00007fe149887e80 nid=0x3f39b waiting on condition  [0x00007fdedd3fd000]
   java.lang.Thread.State: TIMED_WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@17.0.2/Native Method)
	- parking to wait for  <0x00001000270a2020> (a java.util.concurrent.CompletableFuture$Signaller)
	at java.util.concurrent.locks.LockSupport.parkNanos(java.base@17.0.2/LockSupport.java:252)
	at java.util.concurrent.CompletableFuture$Signaller.block(java.base@17.0.2/CompletableFuture.java:1866)
	at java.util.concurrent.ForkJoinPool.unmanagedBlock(java.base@17.0.2/ForkJoinPool.java:3463)
	at java.util.concurrent.ForkJoinPool.managedBlock(java.base@17.0.2/ForkJoinPool.java:3434)
	at java.util.concurrent.CompletableFuture.timedGet(java.base@17.0.2/CompletableFuture.java:1939)
	at java.util.concurrent.CompletableFuture.get(java.base@17.0.2/CompletableFuture.java:2095)
	at org.apache.pulsar.broker.resources.BaseResources.exists(BaseResources.java:183)
	at org.apache.pulsar.broker.resources.NamespaceResources$PartitionedTopicResources.partitionedTopicExists(NamespaceResources.java:302)
	at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.lambda$internalGetPartitionedStats$173(PersistentTopicsBase.java:1579)
	at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase$$Lambda$687/0x0000000801261160.apply(Unknown Source)
	at java.util.concurrent.CompletableFuture.uniHandle(java.base@17.0.2/CompletableFuture.java:934)
	at java.util.concurrent.CompletableFuture.uniHandleStage(java.base@17.0.2/CompletableFuture.java:950)
	at java.util.concurrent.CompletableFuture.handle(java.base@17.0.2/CompletableFuture.java:2340)
	at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.lambda$internalGetPartitionedStats$174(PersistentTopicsBase.java:1560)
	at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase$$Lambda$674/0x00000008012561a0.accept(Unknown Source)

Modifications

Remove blocking calls.

Documentation

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

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jan 9, 2025
…on policy

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
@nodece nodece force-pushed the fix-internalGetPartitionedStats-block branch from c33b7da to 5b67eeb Compare January 10, 2025 09:24
@nodece
Copy link
Member Author

nodece commented Jan 12, 2025

/pulsarbot rerun-failure-checks

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

LGTM

@nodece nodece merged commit dc63970 into apache:master Jan 13, 2025
57 of 58 checks passed
nodece added a commit that referenced this pull request Jan 14, 2025
…23832)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit dc63970)
nodece added a commit that referenced this pull request Jan 14, 2025
…23832)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit dc63970)
nodece added a commit that referenced this pull request Jan 14, 2025
…23832)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit dc63970)
@nodece nodece deleted the fix-internalGetPartitionedStats-block branch January 14, 2025 08:36
@nodece nodece added this to the 4.1.0 milestone Jan 14, 2025
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.

3 participants