Status

Current state: "Under Discussion"

Discussion thread: here

JIRA: here 

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

Currently, the `ProducerPerformance` tool supports transactional producers but cannot randomly abort transactions during testing. This prevents developers from evaluating how transactional producers behave under failure scenarios.

This proposal targets four critical areas:

  1. Measuring the overhead costs of aborting transactions;
  2. Assessing how failed transactions affect producer throughput;
  3. Validating transaction recovery processes;
  4. Benchmarking transactional producers under realistic fault conditions.

Public Interfaces

A single new command-line option is introduced: --transaction-abort-ratio

Property
Description
Type
`Double`
Range
0.0 to 1.0 
Default
0.0 (no transactions aborted)
Dependency
Only valid when transactions are enabled

Proposed Changes

1. Argument parsing (`argParser()`)

Add the `--transaction-abort-ratio` argument after the existing `--transaction-duration-ms` argument:


This feature will add a new configuration option to the ProducerPerformance tool that allows users to specify a ratio of transactions to abort during testing. This will enable users to simulate transaction failure scenarios while measuring performance metrics.

Compatibility, Deprecation, and Migration Plan

This feature is fully backward compatible:

Test Plan

The patch will include unit tests to ensure full coverage:

Rejected Alternatives

None