Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v23.2.x] c/archival_stm: translate sync error to not_leader error code #14997

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #14978
Fixes: #14996,

When `persisted_stm::sync()` method fails it is indicating that the
current node is not longer a leader. The `sync()` executed before
`replicate` call in archival stm `command_batch_builder` prevents
replicate from being called. The end result for such an error is
deterministic and we can translate the sync error to `not_leader` error
code.

Fixes: redpanda-data#14898

Signed-off-by: Michal Maslanka <michal@redpanda.com>
(cherry picked from commit 4dfdc53)
@vbotbuildovich vbotbuildovich added this to the v23.2.x-next milestone Nov 16, 2023
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Nov 16, 2023
@piyushredpanda
Copy link
Contributor

/ci-repeat 1

@piyushredpanda piyushredpanda marked this pull request as ready for review November 18, 2023 20:31
@piyushredpanda piyushredpanda merged commit 083386d into redpanda-data:v23.2.x Nov 19, 2023
25 checks passed
@piyushredpanda piyushredpanda modified the milestones: v23.2.x-next, v23.2.17 Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants