-
Notifications
You must be signed in to change notification settings - Fork 591
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
[v24.1.x] Fixed race condition in disk_log_impl::truncate_prefix
#24284
Open
vbotbuildovich
wants to merge
4
commits into
redpanda-data:v24.1.x
Choose a base branch
from
vbotbuildovich:backport-pr-21324-v24.1.x-30
base: v24.1.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[v24.1.x] Fixed race condition in disk_log_impl::truncate_prefix
#24284
vbotbuildovich
wants to merge
4
commits into
redpanda-data:v24.1.x
from
vbotbuildovich:backport-pr-21324-v24.1.x-30
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added log entry showing a next offset used to initialize log appender. Signed-off-by: Michał Maślanka <[email protected]> (cherry picked from commit b0c152d)
Fixed a race condition which may lead to a situation in which the same offset was assigned to two different records appended to the log. The race condition was happening when one one fiber was appending batches to the log while the other one was prefix truncating it. (Raft does it when taking a snapshot). In this situation it might happened that the batches were appended to the segment which was about to be deleted in `remove_segment_permanently`. This lead to a situation in which an appended batch was lost and the same offset was assigned to the next one. This lead to assertion triggered in `mux_state_machine` Fixes: Signed-off-by: Michał Maślanka <[email protected]> (cherry picked from commit 189098d)
Added a test validating concurrent operations of writing and prefix truncating a log. Signed-off-by: Michał Maślanka <[email protected]> (cherry picked from commit 3a9d721)
Removed the line that informed the user about outstanding locks keeping the segment alive as now the lock is cleared before the segment is closed. Signed-off-by: Michał Maślanka <[email protected]> (cherry picked from commit 09feb36)
the below tests from https://buildkite.com/redpanda/redpanda/builds/58691#019363d2-426b-49cb-9b45-c4b413f168b6 have failed and will be retried
|
non flaky failures in https://buildkite.com/redpanda/redpanda/builds/58691#01936417-50d8-41e7-bdda-a57b0cdf109d:
|
Retry command for Build#58691please wait until all jobs are finished before running the slash command
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of PR #21324
Fixes: #24281,