[ https://issues.apache.org/jira/browse/KAFKA-19337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sushant Mahajan updated KAFKA-19337: ------------------------------------ Description: {{private CoordinatorRecord generateShareStateRecord(}} {{ WriteShareGroupStateRequestData.PartitionData partitionData,}} {{ SharePartitionKey key}} {{)}} In ShareCoordinatorShard writes data as ShareSnapshot or ShareUpdate records. The share updates cannot update the stateEpoch by design. However, each write state request could potentially increment the stateEpoch. If such a write state request is received and the coordinator share partition state is such that a share update record needs to be created, the newer stateEpoch will not get reflected in the state. This could result in older requests still succeeding when they should be fenced. To remedy this, the method should make sure that if a write request has a higher state epoch than previously seen (by querying the internal state) it must create a share snapshot record, even if number of snapshot updates/snapshot is not exceeded.{{ }} > Bug in ShareCoordinatorShard.generateShareStateRecord prevents stateEpoch > update misses. > ---------------------------------------------------------------------------------------- > > Key: KAFKA-19337 > URL: https://issues.apache.org/jira/browse/KAFKA-19337 > Project: Kafka > Issue Type: Sub-task > Reporter: Sushant Mahajan > Assignee: Sushant Mahajan > Priority: Major > > {{private CoordinatorRecord generateShareStateRecord(}} > {{ WriteShareGroupStateRequestData.PartitionData partitionData,}} > {{ SharePartitionKey key}} > {{)}} > In ShareCoordinatorShard writes data as ShareSnapshot or ShareUpdate records. > The share updates cannot update the stateEpoch by design. However, each write > state request could potentially increment the stateEpoch. If such a write > state request is received and the coordinator share partition state is such > that a share update record needs to be created, the newer stateEpoch will not > get reflected in the state. This could result in older requests still > succeeding when they should be fenced. > To remedy this, the method should make sure that if a write request has a > higher state epoch than previously seen (by querying the internal state) it > must create a share snapshot record, even if number of snapshot > updates/snapshot is not exceeded.{{ }} -- This message was sent by Atlassian Jira (v8.20.10#820010)