Skip to main content

Module transaction

Module transaction 

Source
Expand description

Transaction-completion fencing after the EndTxn marker fan-out.

Structs§

TransactionIdentity
A producer identity captured before marker fan-out.
TransactionMarkerPartitionState
The partition’s latest producer state for the marker’s producer ID.
TransactionMarkerRequest
One transaction marker as it reaches one data partition.
TransactionRegistrationFacts
Facts used to fence one transaction partition registration.
TransactionRegistrationIdentityFacts
TransactionRegistrationIdentityMatchFacts
TransactionRegistrationOwnershipFacts
TransactionRegistrationStateFacts
TransactionSnapshot
The persisted identity and state observed after marker fan-out.

Enums§

IdleTransactionState
State fact needed by the idle-transaction reaper.
InitProducerIdIdentityDecision
What InitProducerId does with the producer identity a caller supplies.
LogBatchKind
Classification of the actual first control-record key, shared by live append and recovery. Versions are ignored as in Kafka’s marker type parser.
TransactionCompletionDecision
Whether an EndTxn caller may finalize the entry it prepared.
TransactionMarkerMaterializationDecision
Whether one transaction marker may append and publish committed offsets.
TransactionPidInstallDecision
Whether one transaction record may install its live producer identities.
TransactionReaperCompletionDecision
Whether the idle reaper or the completion task may publish one prepared completion.
TransactionRegistrationDecision
Whether one transaction generation may persist a partition registration.

Constants§

EXHAUSTED_PRODUCER_EPOCH
The epoch at and above which Kafka treats a producer epoch as exhausted (TransactionMetadata.isEpochExhausted).
NO_TRANSACTION_TIMEOUT_MS
Sentinel persisted for a transaction controlled by an external 2PC owner.

Functions§

aborted_transaction_interval
Construct one aborted transaction’s inclusive interval only from a live, nonnegative producer and ordered marker bounds.
aborted_transaction_overlaps
Whether a valid inclusive aborted interval intersects a nonempty half-open Fetch range.
first_unstable_offset
Select the first unstable transaction offset, or the log end when no transaction is open. A pending start beyond the log end is rejected.
init_producer_id_identity_decision
What an InitProducerId caller’s producer identity may do to the entry it names (KIP-360).
log_batch_kind
next_producer_identity
Choose the producer identity exposed after transaction completion.
should_abort_idle_transaction
Whether the idle reaper may abort one persisted transaction.
transaction_completion_decision
Revalidate the transaction entry after the marker fan-out released its lock.
transaction_marker_closes
A valid COMMIT or ABORT marker closes state only for its matching pending producer.
transaction_marker_equal_epoch_fenced
Transaction version 2 requires an epoch bump for a pending transaction’s marker, except at the final marker epoch. Completed retries remain allowed.
transaction_marker_materialization_decision
Fence a transaction marker against the partition’s latest producer and coordinator generations, suppress an exact completed retry, and publish offsets only for a pending commit on __consumer_offsets.
transaction_partition_registration
Fence a partition registration against coordinator ownership and one exact transactional-id, producer-id, and producer-epoch generation.
transaction_pid_install_decision
Admit only a well-formed, uniquely owned producer-ID pair from the transaction log partition selected by its transactional ID.
transaction_reaper_completion_decision
Recheck a prepared snapshot after the abort- or commit-marker fan-out.
unique_aborted_transaction_rows
Preserve every distinct wire (producer_id, first_offset) row exactly once. The caller has already selected the overlapping transactions.