bhargav-naik opened a new pull request, #20908:
URL: https://github.com/apache/kafka/pull/20908

   Last part of KIP-1228
   Here we implement the code path on the partition leader's side. All the 
required steps to handle the write txn markers request.
   Extracting the version information from the request and propagating it to 
the check producer epoch method where we validate the producer epoch based on 
the transaction version.
   
   The transactionVersion flows as follows:
   
   1. Extracted from TxnMarkerEntry in KafkaApis.handleWriteTxnMarkersRequest
   2. There is one append per TransactionMarker in the request
   3. Passed through ReplicaManager.appendRecords → appendRecordsToLeader → 
appendToLocalLog
   4. Passed to Partition.appendRecordsToLeader
   5. Passed to UnifiedLog.appendAsLeader → append → 
analyzeAndValidateProducerState
   6. Passed to UnifiedLog.updateProducers
   7. Passed to ProducerAppendInfo.append → appendEndTxnMarker
   8. Finally used in checkProducerEpoch for epoch validation
   
   The transactionVersion is preserved through the call chain and used in 
checkProducerEpoch to determine whether to apply TV2 (strict > check) or legacy 
(>= check) validation.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to