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

[v24.1.x] Fixed race condition in disk_log_impl::truncate_prefix #24284

Open
wants to merge 4 commits into
base: v24.1.x
Choose a base branch
from

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #21324
Fixes: #24281,

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)
@vbotbuildovich vbotbuildovich added this to the v24.1.x-next milestone Nov 25, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Nov 25, 2024
@vbotbuildovich
Copy link
Collaborator Author

the below tests from https://buildkite.com/redpanda/redpanda/builds/58691#019363d2-426b-49cb-9b45-c4b413f168b6 have failed and will be retried

storage_e2e_single_thread_rpunit

@vbotbuildovich
Copy link
Collaborator Author

non flaky failures in https://buildkite.com/redpanda/redpanda/builds/58691#01936417-50d8-41e7-bdda-a57b0cdf109d:

"rptest.tests.data_transforms_test.DataTransformsLoggingMetricsTest.test_manager_metrics_values"

@vbotbuildovich
Copy link
Collaborator Author

Retry command for Build#58691

please wait until all jobs are finished before running the slash command

/ci-repeat 1
tests/rptest/tests/data_transforms_test.py::DataTransformsLoggingMetricsTest.test_manager_metrics_values

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.

2 participants