Skip to content

Conversation

@Dream95
Copy link
Owner

@Dream95 Dream95 commented Oct 7, 2025

Fixes apache#24788

Motivation

The test is flaky. Beacuse:
In this test, the TransactionBufferTestImpl class extends TopicTransactionBuffer and declares a field with the same name publishFuture.
Therefore, in the appendBufferToTxn method, getPublishFuture() retrieves the publishFuture from the subclass, while the assignment publishFuture = future modifies the publishFuture belonging to the parent class.

 CompletableFuture<Position> future = getPublishFuture().thenCompose(ignore -> {
            ......
        }).whenComplete(((position, throwable) -> buffer.release()));
publishFuture = future;

Modifications

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

…shInOrder (apache#24788)

Signed-off-by: Dream95 <zhou_8621@163.com>
@Dream95 Dream95 force-pushed the fix-flaky-test-24788 branch from 78c24a0 to f571cc6 Compare October 9, 2025 14:09
@github-actions github-actions bot added the PIP label Oct 17, 2025
@Dream95 Dream95 closed this Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky-test: TopicTransactionBufferTest.testMessagePublishInOrder

3 participants