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/07 03:22:21 UTC
[GitHub] [kafka] dengziming opened a new pull request #9575: MINOR: optimize lock operation
dengziming opened a new pull request #9575:
URL: https://github.com/apache/kafka/pull/9575
move lock backward.
----------------------------------------------------------------
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
[GitHub] [kafka] dengziming closed pull request #9575: MINOR: optimize lock operation
Posted by GitBox <gi...@apache.org>.
dengziming closed pull request #9575:
URL: https://github.com/apache/kafka/pull/9575
----------------------------------------------------------------
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
[GitHub] [kafka] dengziming commented on a change in pull request #9575: MINOR: optimize lock operation
Posted by GitBox <gi...@apache.org>.
dengziming commented on a change in pull request #9575:
URL: https://github.com/apache/kafka/pull/9575#discussion_r519552611
##########
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:
good catch!
----------------------------------------------------------------
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
[GitHub] [kafka] chia7712 commented on a change in pull request #9575: MINOR: optimize lock operation
Posted by GitBox <gi...@apache.org>.
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