[ 
https://issues.apache.org/jira/browse/KAFKA-15803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17788757#comment-17788757
 ] 

Lucas Brutschy commented on KAFKA-15803:
----------------------------------------

>From what I can see, we seem to be missing mostly is updating the epoch in 
>`commitAsync` and `committed`.

Otherwise, both implementations seem to behave the same.

> Update last seen epoch during commit
> ------------------------------------
>
>                 Key: KAFKA-15803
>                 URL: https://issues.apache.org/jira/browse/KAFKA-15803
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: clients, consumer
>            Reporter: Philip Nee
>            Assignee: Lucas Brutschy
>            Priority: Major
>              Labels: kip-848-client-support, kip-848-e2e, kip-848-preview
>
> At the time we implemented commitAsync in the prototypeAsyncConsumer, 
> metadata was not there. The ask here is to investigate if we need to add the 
> following function to the commit code:
>  
> private void updateLastSeenEpochIfNewer(TopicPartition topicPartition, 
> OffsetAndMetadata offsetAndMetadata) {
> if (offsetAndMetadata != null)
> offsetAndMetadata.leaderEpoch().ifPresent(epoch -> 
> metadata.updateLastSeenEpochIfNewer(topicPartition, epoch));
> }



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

Reply via email to