MCPcopy
hub / github.com/IBM/sarama / abortableErrorIfPossible

Method abortableErrorIfPossible

transaction_manager.go:603–609  ·  view source on GitHub ↗

if kafka cluster is at least 2.5.0 mark txnmngr to bump epoch else mark it as fatal.

(err error)

Source from the content-addressed store, hash-verified

601
602// if kafka cluster is at least 2.5.0 mark txnmngr to bump epoch else mark it as fatal.
603func (t *transactionManager) abortableErrorIfPossible(err error) error {
604 if t.coordinatorSupportsBumpingEpoch {
605 t.epochBumpRequired = true
606 return t.transitionTo(ProducerTxnFlagInError|ProducerTxnFlagAbortableError, err)
607 }
608 return t.transitionTo(ProducerTxnFlagInError|ProducerTxnFlagFatalError, err)
609}
610
611// End current transaction.
612func (t *transactionManager) completeTransaction() error {

Callers 3

publishOffsetsToTxnMethod · 0.95
endTxnMethod · 0.95
publishTxnPartitionsMethod · 0.95

Calls 1

transitionToMethod · 0.95

Tested by

no test coverage detected