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] raft: in append_entries skip batches that we already have #18523

Merged
merged 4 commits into from
May 17, 2024

Conversation

ztlpn
Copy link
Contributor

@ztlpn ztlpn commented May 16, 2024

Backport of PR #17895

Fixes #17957

ztlpn added 4 commits May 16, 2024 12:44
(cherry picked from commit 9753c9a)

Conflicts:
	src/v/raft/consensus.cc
It is similar to for_each_ref, but advances only if the consumer returns
ss::stop_iteration::no. I.e. the batch where the consumer stopped remains
available for reading by subsequent consumers.

(cherry picked from commit 9342811)
Extract configurations using a wrapping batch consumer instead.

(cherry picked from commit 2f432c2)
This is important for the case when we already have _all_ batches locally
(possible if e.g. the request was delayed/duplicated). In this case we don't
want to truncate, otherwise we might lose already committed data.

Fixes redpanda-data#17731

(cherry picked from commit f0c5772)
@ztlpn ztlpn added this to the v23.3.x-next milestone May 16, 2024
@ztlpn ztlpn added the kind/backport PRs targeting a stable branch label May 16, 2024
@ztlpn ztlpn marked this pull request as ready for review May 16, 2024 10:48
@ztlpn ztlpn linked an issue May 16, 2024 that may be closed by this pull request
@mmaslankaprv mmaslankaprv merged commit d891099 into redpanda-data:v23.3.x May 17, 2024
18 checks passed
@piyushredpanda piyushredpanda modified the milestones: v23.3.x-next, v23.3.16 May 19, 2024
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.

[v23.3.x] raft: in append_entries skip batches that we already have
3 participants