chia7712 commented on a change in pull request #10269:
URL: https://github.com/apache/kafka/pull/10269#discussion_r588049196



##########
File path: core/src/main/scala/kafka/server/FetchSession.scala
##########
@@ -411,54 +436,40 @@ class IncrementalFetchContext(private val time: Time,
     }
   }
 
-  // Iterator that goes over the given partition map and selects partitions 
that need to be included in the response.
-  // If updateFetchContextAndRemoveUnselected is set to true, the fetch 
context will be updated for the selected
-  // partitions and also remove unselected ones as they are encountered.
-  private class PartitionIterator(val iter: FetchSession.RESP_MAP_ITER,

Review comment:
       The `iterator` is unnecessary since we have to generate `list` 
collection in order to calculate message 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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to