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

[pulsar-broker] Fix: unblock stuck thread on update-partition api #10447

Merged
merged 1 commit into from
Apr 30, 2021

Conversation

rdhabalia
Copy link
Contributor

Motivation

Recently we have seen that update partitioned topic API stuck sometime and if user tries to call the API multiple time then it blocks all web threads of broker. So, set the timeout to unblock web-threads on update partition API.

"pulsar-web-35-22" #273 prio=5 os_prio=0 cpu=676.55ms elapsed=309.19s tid=0x00007fc2e8001530 nid=0x1e74 waiting on condition  [0x00007fc08af3a000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@11.0.8/Native Method)
        - parking to wait for  <0x000010002f9bb5b8> (a java.util.concurrent.CompletableFuture$Signaller)
        at java.util.concurrent.locks.LockSupport.park(java.base@11.0.8/LockSupport.java:194)
        at java.util.concurrent.CompletableFuture$Signaller.block(java.base@11.0.8/CompletableFuture.java:1796)
        at java.util.concurrent.ForkJoinPool.managedBlock(java.base@11.0.8/ForkJoinPool.java:3128)
        at java.util.concurrent.CompletableFuture.waitingGet(java.base@11.0.8/CompletableFuture.java:1823)
        at java.util.concurrent.CompletableFuture.get(java.base@11.0.8/CompletableFuture.java:1998)
        at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.internalUpdatePartitionedTopic(PersistentTopicsBase.java:440)
        at org.apache.pulsar.broker.admin.v1.PersistentTopics.updatePartitionedTopic(PersistentTopics.java:175)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@11.0.8/Native Method)
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@11.0.8/NativeMethodAccessorImpl.java:62)
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@11.0.8/DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(java.base@11.0.8/Method.java:566)
        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$$Lambda$372/0x00007fc24f6d0040.invoke(Unknown Source)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
        at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:183)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)

@rdhabalia rdhabalia added this to the 2.8.0 milestone Apr 30, 2021
@rdhabalia rdhabalia self-assigned this Apr 30, 2021
@eolivelli eolivelli merged commit 464ad59 into apache:master Apr 30, 2021
@rdhabalia rdhabalia deleted the part_stuck branch April 30, 2021 17:15
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.

2 participants