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

c/archival_stm: translate sync error to not_leader error code #14978

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

mmaslankaprv
Copy link
Member

@mmaslankaprv mmaslankaprv commented Nov 15, 2023

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: #14898

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.2.x
  • v23.1.x
  • v22.3.x

Release Notes

  • none

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>
@VladLazar
Copy link
Contributor

When persisted_stm::sync() method fails it is indicating that the current node is not longer a leader

It's also possible that it genuinely timed out, but that's probably much less likely.

@mmaslankaprv mmaslankaprv merged commit 1bcb371 into redpanda-data:dev Nov 16, 2023
21 of 23 checks passed
@mmaslankaprv mmaslankaprv deleted the fix-14898 branch November 16, 2023 10:11
@vbotbuildovich
Copy link
Collaborator

/backport v23.2.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI Failure (Internal Server Error) in EndToEndShadowIndexingTestWithDisruptions.test_write_with_node_failures
3 participants