[ 
https://issues.apache.org/jira/browse/KAFKA-17244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17895877#comment-17895877
 ] 

Jianbin Chen commented on KAFKA-17244:
--------------------------------------

Can someone help take a look at this issue? It causes the response time of the 
application to increase momentarily upon startup due to this blocking.
 
 
 
 
 

> java.base/java.lang.VirtualThread$VThreadContinuation.onPinned
> --------------------------------------------------------------
>
>                 Key: KAFKA-17244
>                 URL: https://issues.apache.org/jira/browse/KAFKA-17244
>             Project: Kafka
>          Issue Type: Wish
>          Components: clients, producer 
>    Affects Versions: 3.7.1
>            Reporter: Jianbin Chen
>            Priority: Major
>
> {code:java}
> Thread[#121,ForkJoinPool-1-worker-2,5,CarrierThreads]
> java.base/java.lang.VirtualThread$VThreadContinuation.onPinned(VirtualThread.java:183)
> java.base/jdk.internal.vm.Continuation.onPinned0(Continuation.java:393)
> java.base/java.lang.VirtualThread.tryYield(VirtualThread.java:756)
> java.base/java.lang.Thread.yield(Thread.java:443)
> java.base/java.util.concurrent.ConcurrentHashMap.initTable(ConcurrentHashMap.java:2295)
> java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1017)
> java.base/java.util.concurrent.ConcurrentHashMap.putIfAbsent(ConcurrentHashMap.java:1541)
> org.apache.kafka.common.record.CompressionRatioEstimator.getAndCreateEstimationIfAbsent(CompressionRatioEstimator.java:96)
> org.apache.kafka.common.record.CompressionRatioEstimator.estimation(CompressionRatioEstimator.java:59)
> org.apache.kafka.clients.producer.internals.ProducerBatch.<init>(ProducerBatch.java:95)
> org.apache.kafka.clients.producer.internals.ProducerBatch.<init>(ProducerBatch.java:83)
> org.apache.kafka.clients.producer.internals.RecordAccumulator.appendNewBatch(RecordAccumulator.java:399)
> org.apache.kafka.clients.producer.internals.RecordAccumulator.append(RecordAccumulator.java:350)
>  <== monitors:1
> org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:1025)
> org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:947) 
> {code}
> Because there is synchronized in the {{RecordAccumulator.append}} method, 
> which causes the virtual thread to be {{{}onPinned{}}}, if this is considered 
> an optimization item, please assign it to me, and I will try to optimize the 
> problem.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to