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.1.x] archival: avoid replicating empty read replica batch #14634

Merged

Conversation

andrwng
Copy link
Contributor

@andrwng andrwng commented Nov 3, 2023

NOTE: This doesn't exist in v23.2.x and above.

Empty batches aren't well-handled and can result in corrupted segments. This commit adjusts read replicas to avoid this when there is no difference between the remote manifest and in-memory manifest.

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

Bug Fixes

  • Fixes a bug in read replicas that were subject to unstable leadership that could create corrupted local segment files (note, segments in the cloud are safe).

Empty batches aren't well-handled and can result in corrupted segments.
This commit adjusts read replicas to avoid this when there is no
difference between the remote manifest and in-memory manifest.
@dotnwat
Copy link
Member

dotnwat commented Nov 3, 2023

should we add a strategically placed flag in redpanda to prevent empty batches? it kinda seems based on this coverletter that even though we don't have empty batches in upstream, there still lurks bugs if we empty batches did show up int he future?

@dotnwat dotnwat requested a review from Lazin November 7, 2023 03:39
@piyushredpanda piyushredpanda merged commit 1a20876 into redpanda-data:v23.1.x Nov 7, 2023
22 checks passed
@piyushredpanda
Copy link
Contributor

/backport v22.3.x

@vbotbuildovich
Copy link
Collaborator

The pull request's base branch is not the default one. Cancelling backport...

Workflow run logs.

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.

None yet

5 participants