You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/03/16 09:40:22 UTC

[GitHub] [kafka] chia7712 commented on a change in pull request #10318: KAFKA-12330; FetchSessionCache may cause starvation for partitions when FetchResponse is full

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



##########
File path: core/src/main/scala/kafka/server/FetchSession.scala
##########
@@ -428,7 +428,7 @@ class IncrementalFetchContext(private val time: Time,
         val mustRespond = cachedPart.maybeUpdateResponseData(respData, updateFetchContextAndRemoveUnselected)
         if (mustRespond) {
           nextElement = element
-          if (updateFetchContextAndRemoveUnselected) {
+          if (updateFetchContextAndRemoveUnselected && FetchResponse.recordsSize(respData) > 0) {

Review comment:
       Does it result in the side effect that we always fetch the no-data partitions?




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