Lianet Magrans created KAFKA-20213:
--------------------------------------

             Summary: Review assignment updates in ShareConsumer from 
background reconciliations 
                 Key: KAFKA-20213
                 URL: https://issues.apache.org/jira/browse/KAFKA-20213
             Project: Kafka
          Issue Type: Task
          Components: clients, consumer
            Reporter: Lianet Magrans


The ShareConsumer triggers reconciliations from the app thread when poll is 
called, and from the background thread (on regular polls of the background 
membership Mgr).

In both cases, a full reconciliation is performed, finishing with an assignment 
update. Note that this means that if the reconciliation is triggered from the 
background thread, it will update the assignment without a triggering call to 
shareConsumer.poll.

This task is to review if this assignment update without a triggering poll has 
undersired effects in the ShareConsumer APIs.

For context, this behaviour is being fixed in the AsyncConsumer because it 
introduced friction with apis like consumer.assignment() (returns a copy of the 
assignment that could change anytime if we allow updates from background 
reconciliations), and APIs like seek/position, that fail if called on 
partitions not assigned. The asynConsumer will only allow assignment updates in 
reconciliations triggered from a call to consumer.poll (which was already the 
case for reconciliations that require auto-commit or callbacks. Can only be 
triggered from consumer.poll, not from background reconciliations)

The ShareConsumer API is very different in this area, so this is just to review 
if it's ok to continue allowing background reconciliations to update the 
assignment, or if we think it should follow the same restrictions as the 
AsyncConsumer.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to