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

[v21.11.x] Backport "Persisted_stm: fix sync timing out in case of acks=1" #4289

Merged
merged 2 commits into from
Apr 15, 2022

Conversation

ztlpn
Copy link
Contributor

@ztlpn ztlpn commented Apr 14, 2022

Cover letter

Backport #4277 to v21.11.x

Fixes #4288

Previously, if the user produced with acks=1, persisted_stm::sync always
timed out because we tried to wait until commit_index reached the
current dirty offset and, even though we flushed on the leader, the
followers didn't flush and commit_index didn't move.

Instead, now we sync only up to the last offset before the start of the
current term. This upholds the contract of persisted_stm::sync ("it waits
until the state machine is caught up with all the events written by the
previous leaders") and we don't have to do any additional flushes
because after election the new leader replicates the configuration batch
and always does it with acks=-1.

(cherry picked from commit 8737bde)
@ztlpn ztlpn merged commit 4e2b210 into redpanda-data:v21.11.x Apr 15, 2022
@ztlpn ztlpn deleted the v21.11.x-bp-4277 branch November 27, 2023 13:18
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.

[v21.11.x] Data retention stops working with acks=1 and shadow indexing
3 participants