dajac opened a new pull request, #14120:
URL: https://github.com/apache/kafka/pull/14120

   This patch implements the OffsetFetch API in the new group coordinator.
   
   I found out that implementing the `RequireStable` flag is hard (to not say 
impossible) in the current model. For the context, the flag is here to ensure 
that an OffsetRequest request does not return stale offsets if there are 
pending offsets to be committed. In the scala code, we basically check the 
pending offsets data structure and if they are any pending offsets, we return 
the `UNSTABLE_OFFSET_COMMIT` error. This tells the consumer to retry.
   
   In our new model, we don't have the pending offsets data structure. Instead, 
we use a timeline data structure to handle all the pending/uncommitted changes. 
Because of this we don't know whether offsets are pending for a particular 
group. Instead of doing this, I propose to not return the 
`UNSTABLE_OFFSET_COMMIT` error anymore. Instead, when `RequireStable` is set, 
we use a write operation to ensure that we read the latest offsets. If they are 
uncommitted offsets, the write operation ensures that the response is only 
return when they are committed. This gives a similar behaviour in the end.
   
   Note that this PR does not adds the MemberId and MemberEpoch fields to the 
request. This will be done in the next PR.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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