kirktrue commented on PR #14680:
URL: https://github.com/apache/kafka/pull/14680#issuecomment-1811620894

   @lucasbru As @philipnee said, the two mechanisms appear similar and do have 
overlap. However, not only is it "awkward" to mix them, but it raises 
correctness questions.
   
   `poll()` processes  _all_ of the events in the queue from the background 
thread. However, when the user calls `commit`*, we want to execute only the 
commit callbacks. As a result, we would have to _filter and remove_ the 
relevant events from the background thread.
   
   The questions that arose:
   
   * What if, when processing the commit callbacks, we see error events in the 
queue? Do we skip them? Execute them? Or something else?
   * Will removing the events from the background event queue cause unforeseen 
issues later when calling `poll()`?
   
   The answer may be that it's totally fine. We kind of "punted" by doing it 
this way, not only because of those questions, but because it seemed a bit 
awkward 🤷‍♂️ 


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