Skip to content

fix(consensus): preserve SyncLog retry ordering - #18323

Open
Caideyipi wants to merge 2 commits into
apache:masterfrom
Caideyipi:codex/pr-18317-ordering-ut-master
Open

fix(consensus): preserve SyncLog retry ordering#18323
Caideyipi wants to merge 2 commits into
apache:masterfrom
Caideyipi:codex/pr-18317-ordering-ut-master

Conversation

@Caideyipi

@Caideyipi Caideyipi commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Description

Fix the SyncLog retry ordering regression covered by this PR.

When the follower encounters the first retryable write error in a batch, it now stops applying subsequent requests immediately. The remaining response entries are filled with WRITE_PROCESS_REJECT statuses indicating that they must wait for the previous request to complete. The leader can still retry the whole batch without allowing later requests to overtake the failed request.

The regression test now also verifies the deferred status and message for the unprocessed request.

Verification

  • ReplicateTest#syncLogWriteProcessErrorRetryPreservesRequestOrderTest
  • ReplicateTest#syncLogWriteProcessErrorTriggersLeaderRetryTest
  • Maven Spotless and Checkstyle
  • Consensus reactor test-compile with the Chinese locale

This PR has:

  • been self-reviewed.
  • added unit tests to cover the regression.

Key changed/added classes
  • IoTConsensusServerImpl
  • ReplicateTest

@jt2594838 jt2594838 changed the title test(consensus): expose SyncLog retry ordering issue fix(consensus): preserve SyncLog retry ordering Jul 28, 2026
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.

2 participants