vvcephei commented on pull request #9836:
URL: https://github.com/apache/kafka/pull/9836#issuecomment-765602186


   Thanks @guozhangwang . I share that concern.
   
   It's a little different than what you pointed out, but to call attention to 
it: I actually didn't change the definition of `ConsumerRecords#isEmpty`. It is 
still just `return records.isEmpty()`, so it is only true when there are 
records. The specific rationale is not to break logic similar to what you 
quoted.
   
   To your point, it's true that `M > N`, but I doubt that `M >> N`. The rate 
at which we return is still bounded by the `latency * concurrency` of fetch 
request-response lifecycles _that return some records or metadata_. As long as 
there's no new information to return, the Consumer's long-poll will still be 
effective.
   
   And to the final point, I really doubt that any real code could have an 
expectation that they can just call `poll` and _always_ get nonzero records 
back. It just doesn't seem like a reasonable expectation from a user's 
perspective.


----------------------------------------------------------------
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