soarez commented on code in PR #12314:
URL: https://github.com/apache/kafka/pull/12314#discussion_r902057670
##########
server-common/src/main/java/org/apache/kafka/queue/KafkaEventQueue.java:
##########
@@ -166,6 +171,13 @@ private class EventHandler implements Runnable {
* A condition variable for waking up the event handler thread.
*/
private final Condition cond = lock.newCondition();
+ private final Consumer<Integer> onQueueSizeChange;
+
+ private AtomicInteger size = new AtomicInteger(0);
Review Comment:
There should never be that many events in the queue that can't fit in an
int. Each event is a runnable, held in a linked list. Mind that
`java.util.LinkedList` for example, uses `int` for size.
--
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]