You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by "horizonzy (via GitHub)" <gi...@apache.org> on 2023/06/25 03:34:29 UTC
[GitHub] [zookeeper] horizonzy commented on a diff in pull request #2021: Reduce outstanding changes race condition
horizonzy commented on code in PR #2021:
URL: https://github.com/apache/zookeeper/pull/2021#discussion_r1241015673
##########
zookeeper-server/src/main/java/org/apache/zookeeper/server/PrepRequestProcessor.java:
##########
@@ -101,7 +101,7 @@ public class PrepRequestProcessor extends ZooKeeperCriticalThread implements Req
*/
private static boolean failCreate = false;
- LinkedBlockingQueue<Request> submittedRequests = new LinkedBlockingQueue<>();
+ BatchedArrayBlockingQueue<Request> submittedRequests = new BatchedArrayBlockingQueue<>(10240);
Review Comment:
We use `put` to take the place of `add.` If the enqueued request is full, the put operation will block.
--
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: notifications-unsubscribe@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org