michaeljmarshall commented on issue #14438: URL: https://github.com/apache/pulsar/issues/14438#issuecomment-1050574560
@leizhiyuan - in your thread dump, what is the stack for the thread named `metadata-store-x-x` where `x` is a number? If I had to guess, that thread is in a `WAITING` state, and is the reason that the future will never return. In master, here are the lines that are causing the issue: https://github.com/apache/pulsar/blob/0ef7baa5131f0dee4a57e61eae1d7686f7f60f1e/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java#L310-L319. In 2.8, we added that `execute` method call, which schedules `exists` callbacks to run on this single threaded executor: https://github.com/apache/pulsar/blob/0ef7baa5131f0dee4a57e61eae1d7686f7f60f1e/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java#L78-L79 If that executor is not handling requests, it will not complete futures, and which will lead to the problem you're seeing here. In my case, I can see the following stack for my metadata-store thread: ``` "metadata-store-6-1" - Thread t@22 java.lang.Thread.State: WAITING at [email protected]/jdk.internal.misc.Unsafe.park(Native Method) - parking to wait for <16ddd841> (a java.util.concurrent.CompletableFuture$Signaller) at [email protected]/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194) at [email protected]/java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1796) at [email protected]/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3128) at [email protected]/java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1823) at [email protected]/java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2043) at app//org.apache.pulsar.broker.service.persistent.PersistentTopic.lambda$tryToDeletePartitionedMetadata$96(PersistentTopic.java:2267) at app//org.apache.pulsar.broker.service.persistent.PersistentTopic$$Lambda$1354/0x0000000840851c40.accept(Unknown Source) at [email protected]/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714) at [email protected]/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) at [email protected]/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) at app//org.apache.pulsar.metadata.impl.ZKMetadataStore.lambda$null$7(ZKMetadataStore.java:139) at app//org.apache.pulsar.metadata.impl.ZKMetadataStore$$Lambda$234/0x0000000840343840.run(Unknown Source) at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at app//io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at [email protected]/java.lang.Thread.run(Thread.java:829) Locked ownable synchronizers: - locked <37622120> (a java.util.concurrent.ThreadPoolExecutor$Worker) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
