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.3.x] Improved validation of Fetch requests when reading from follower #17574

Conversation

mmaslankaprv
Copy link
Member

Backport of PR #17498

…nsumable"

This reverts commit 3d9a794.

(cherry picked from commit eff61b3)
Signed-off-by: Michał Maślanka <michal@redpanda.com>
(cherry picked from commit 351f00a)
When truncation happens all the offsets should be updated before it
finishes as the truncated data should not be accessed during and
immediately after truncation. Updating offsets before truncation
guarantees the state is up to data right after the truncation finishes.

Signed-off-by: Michał Maślanka <michal@redpanda.com>
(cherry picked from commit a1097d4)
Signed-off-by: Michał Maślanka <michal@redpanda.com>
(cherry picked from commit 69753bb)
When reading from the follower the offset information may not be up to
date. In Redpanda we implemented the behavior that is described in
`KIP-392`. The described mechanism assumes that consumer will reconcile
with the leader after they receive the offset out of range error from
the follower. This is not implemented by the clients hence returning
out of range error resulted in offset reset.

With the fix in this commit we will never return the out of range error
from a node not being a leader. This way consumers will only use leader
to validate its offset and we will avoid spurious resets.

Signed-off-by: Michał Maślanka <michal@redpanda.com>
(cherry picked from commit 0c6354c)
@mmaslankaprv mmaslankaprv force-pushed the vbotbuildovich/backport-17498-v23.3.x-251 branch from cf2df60 to d140352 Compare April 3, 2024 11:23
@mmaslankaprv
Copy link
Member Author

ci failure: #17222

@mmaslankaprv mmaslankaprv merged commit 57a7707 into redpanda-data:v23.3.x Apr 3, 2024
13 of 16 checks passed
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.

[v23.3.x] Improved validation of Fetch requests when reading from follower
2 participants