jolshan commented on code in PR #13391: URL: https://github.com/apache/kafka/pull/13391#discussion_r1147804661
########## core/src/main/scala/kafka/network/RequestChannel.scala: ########## @@ -483,14 +493,10 @@ class RequestChannel(val queueSize: Int, def sendShutdownRequest(): Unit = requestQueue.put(ShutdownRequest) - // TODO: this is the most straightforward implementation, we may want to address fairness: - // The callback function is invoked as part of processing a request, so it already "stood in line" - // when the original request got accepted, so it may be unfair to make put to the end of the line. - // A simple solution would be to put it to the head of the line, but then multiple callbacks would - // be in LIFO order, which is weird. - // We may want to use a PriorityBlockingQueue or just have 2 queues and write customer wait / notify - // synchronization. - def sendCallbackRequest(request: CallbackRequest): Unit = requestQueue.put(request) + def sendCallbackRequest(request: CallbackRequest): Unit = { + callbackQueue.put(request) Review Comment: So it is the case that all the action entries are removed before the next request? For some reason I thought it just cleared one for each request. I can take a look. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org