codelipenghui commented on pull request #12202:
URL: https://github.com/apache/pulsar/pull/12202#issuecomment-1015036740


   @wuzhanpeng After taking a look at the complete stack, looks the issue is 
related to checking topic policies 
   
   ```
   "ForkJoinPool.commonPool-worker-110" #482 daemon prio=5 os_prio=0 
tid=0x00007fd714021000 nid=0x61a3 waiting on condition  [0x00007fd562772000]
      java.lang.Thread.State: TIMED_WAITING (parking)
        at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
        - parking to wait for  <0x00000006284caad0> (a 
java.util.concurrent.CompletableFuture$Signaller)
        at 
java.util.concurrent.locks.LockSupport.parkNanos([email protected]/LockSupport.java:234)
        at 
java.util.concurrent.CompletableFuture$Signaller.block([email protected]/CompletableFuture.java:1798)
        at 
java.util.concurrent.ForkJoinPool.managedBlock([email protected]/ForkJoinPool.java:3146)
        at 
java.util.concurrent.CompletableFuture.timedGet([email protected]/CompletableFuture.java:1868)
        at 
java.util.concurrent.CompletableFuture.get([email protected]/CompletableFuture.java:2021)
        at 
org.apache.pulsar.zookeeper.ZooKeeperDataCache.get(ZooKeeperDataCache.java:97)
        at 
org.apache.pulsar.broker.service.AbstractTopic.isProducersExceeded(AbstractTopic.java:156)
        at 
org.apache.pulsar.broker.service.AbstractTopic.internalAddProducer(AbstractTopic.java:629)
        at 
org.apache.pulsar.broker.service.AbstractTopic.lambda$addProducer$8(AbstractTopic.java:405)
        at 
org.apache.pulsar.broker.service.AbstractTopic$$Lambda$1433/1422007940.accept(Unknown
 Source)
        at 
java.util.concurrent.CompletableFuture.uniAcceptNow([email protected]/CompletableFuture.java:753)
        at 
java.util.concurrent.CompletableFuture.uniAcceptStage([email protected]/CompletableFuture.java:731)
        at 
java.util.concurrent.CompletableFuture.thenAccept([email protected]/CompletableFuture.java:2108)
        at 
org.apache.pulsar.broker.service.AbstractTopic.addProducer(AbstractTopic.java:392)
        at 
org.apache.pulsar.broker.service.persistent.PersistentTopic.addProducer(PersistentTopic.java:540)
        at 
org.apache.pulsar.broker.service.ServerCnx.lambda$null$22(ServerCnx.java:1233)
        at 
org.apache.pulsar.broker.service.ServerCnx$$Lambda$1428/932296811.accept(Unknown
 Source)
        at 
java.util.concurrent.CompletableFuture$UniAccept.tryFire([email protected]/CompletableFuture.java:714)
        at 
java.util.concurrent.CompletableFuture.postComplete([email protected]/CompletableFuture.java:506)
        at 
java.util.concurrent.CompletableFuture.complete([email protected]/CompletableFuture.java:2073)
        at 
org.apache.pulsar.broker.service.schema.BookkeeperSchemaStorage.lambda$null$6(BookkeeperSchemaStorage.java:217)
        at 
org.apache.pulsar.broker.service.schema.BookkeeperSchemaStorage$$Lambda$1421/1611023719.apply(Unknown
 Source)
        at 
java.util.concurrent.CompletableFuture.uniHandle([email protected]/CompletableFuture.java:930)
        at 
java.util.concurrent.CompletableFuture$UniHandle.tryFire([email protected]/CompletableFuture.java:907)
        at 
java.util.concurrent.CompletableFuture$Completion.exec([email protected]/CompletableFuture.java:479)
        at 
java.util.concurrent.ForkJoinTask.doExec([email protected]/ForkJoinTask.java:290)
        at 
java.util.concurrent.ForkJoinPool.runWorker([email protected]/ForkJoinPool.java:1603)
        at 
java.util.concurrent.ForkJoinWorkerThread.run([email protected]/ForkJoinWorkerThread.java:177)
   
      Locked ownable synchronizers:
        - <0x0000000624e2e9a0> (a 
java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
   ```
   
   After #13082, I think the issue has been fixed, but it only can fix the 
master branch and 2.10. For version < 2.10, I think we should change 
`topicPolicies.getMaxProducersPerTopic()` to only check the topic policies in 
the cache, it looks like `getIfPresent`. We should fix the branch-2.8 and 
branch-2.9.


-- 
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]


Reply via email to