You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/11/08 15:47:12 UTC

[GitHub] [kafka] chia7712 commented on a change in pull request #9575: MINOR: optimize lock operation

chia7712 commented on a change in pull request #9575:
URL: https://github.com/apache/kafka/pull/9575#discussion_r519441272



##########
File path: clients/src/main/java/org/apache/kafka/clients/producer/internals/BufferPool.java
##########
@@ -112,12 +112,11 @@ public ByteBuffer allocate(int size, long maxTimeToBlockMs) throws InterruptedEx
                                                + " on memory allocations.");
 
         ByteBuffer buffer = null;
-        this.lock.lock();

Review comment:
       The read/write of ```closed``` must be in lock so this improvement is not acceptable to ```BufferPool```.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org