guozhangwang commented on pull request #9823:
URL: https://github.com/apache/kafka/pull/9823#issuecomment-763225099


   @huangyiminghappy it seems that your assumption is, for most cases, there 
will just be one inflight request, and hence the batch to be enqueued would 
most likely need to be add to the last of the queue since very likely none of 
the batches in `deque` would have a sequence number, is that right?
   
   Logically I think I agree with your reasoning here, and this optimization 
makes sense. But I'm wondering how much it is actually optimizing in practice 
-- looping over the `deque` should usually be very quick since the `deque` 
should be relatively short, like having single-digit number of batches.
   
   Do you observe in your production environment, that the number of batches in 
`deque` could be very large and hence looping over it to the end could be very 
costly?


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to