Skip to content

RATIS-2433. Cancel transaction in case of failure to append#1382

Open
spacemonkd wants to merge 2 commits intoapache:masterfrom
spacemonkd:RATIS-2433
Open

RATIS-2433. Cancel transaction in case of failure to append#1382
spacemonkd wants to merge 2 commits intoapache:masterfrom
spacemonkd:RATIS-2433

Conversation

@spacemonkd
Copy link

What changes were proposed in this pull request?

Currently in RaftServerImpl#writeAsyncImpl() the client request is added to the pending requests asynchronously.

In between if there is any failure/exception in appendTransactions() then we are not cancelling the transaction. The failure is returned to the client/retry-cache, but the statemachine is not notified.
This can cause partial state in the statemachine.

We should handle this such that in case of exceptions the statemachine is notified via cancelTransaction().

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/RATIS-2433

How was this patch tested?

Patch was tested via unit tests

@spacemonkd spacemonkd marked this pull request as ready for review March 21, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant