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

[v22.3.x] cloud_storage: Prevent segment from being added to the manifest twice #9618

Conversation

Lazin
Copy link
Contributor

@Lazin Lazin commented Mar 22, 2023

Throw exception if the segment with the same parameters is added to the manifest second time. In this case the 'replaced' and 'segments' lists will have the same segment. The name of the segment is the same so when the housekeeping will remove it we will lose the data completely.

Backports #9597

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.1.x
  • v22.3.x
  • v22.2.x

Release Notes

Bug Fixes

  • Prevent possible data loss in situation when the same segment is added twice to the manifest

Throw exception if the segment with the same parameters is added to the
manifest second time. In this case the 'replaced' and 'segments' lists
will have the same segment. The name of the segment is the same so when
the housekeeping will remove it we will lose the data completely.

(cherry picked from commit d4bc671)
@vshtokman vshtokman added this to the v22.3.15 milestone Mar 22, 2023
@Lazin Lazin merged commit 3d92899 into redpanda-data:v22.3.x Mar 22, 2023
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.

3 participants