chia7712 commented on PR #16833:
URL: https://github.com/apache/kafka/pull/16833#issuecomment-2294621243

   > The network layer has a timeout applied generally, not specific 
per-request, taken from the REQUEST_TIMEOUT_MS config, and passed into the 
network layer when creating a new consumer, follow from 
[here](https://github.com/apache/kafka/blob/cd47b3c1cce7a9f1881e40d38742b9ec8b30cf32/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ClassicKafkaConsumer.java#L197),
 for instance). Basically, that's how long a client will wait for responses 
from the server. That's not the same as the timeout provided by a specific api 
call like committed or commit (the ones we're trying to respect with all these 
failAndRemove logic), indicating how long that specific call should block 
waiting to complete. Am I missing something here?
   
   yep, you are right :smile:  the timeout is different.
   
   > It's useful/wanted in other paths though, commit for instance, where we do 
want to trigger the commit even though we fail/timeout right away because of 
timeout 0, just meaning that the client won't wait for a response.
   
   I overlook the case of "timeout=0". happy to know that.
   
   > completeExceptionally the request if it's expired -> this is already done 
by the event reaping logic that applies to all events, and does 
completeExceptionally if expired, right after polling the managers 
([ConsumerNetworkTread#reapExpiredApplicationEvents](https://github.com/apache/kafka/blob/cd47b3c1cce7a9f1881e40d38742b9ec8b30cf32/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkThread.java#L156)).
   
   I totally agree to this path. Also, there is another path which can complete 
future chain with timeout exception
   
   
https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java#L333
   
   


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

Reply via email to