pub fn transaction_completion_decision(
current: TransactionSnapshot,
expected: TransactionIdentity,
completion: TransactionIdentity,
prepare_state: i8,
complete_state: i8,
) -> TransactionCompletionDecisionExpand description
Revalidate the transaction entry after the marker fan-out released its lock.
expected and prepare_state are what the caller prepared; completion
and complete_state are the completion it intends to write. The live entry
already holding that completion is an idempotent success; otherwise the
entry must still hold the prepared identity (else it was fenced) and the
prepared state (else another caller moved it).
The two state tags are one Kafka Prepare* -> Complete* pairing, which the
host takes from a fixed mapping, so they differ.