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.3.x] raft: Make load_snapshot exception safe #24672

Merged

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #24662

The 'load_snapshot' method of the 'file_backed_stm_snapshot' class is
not exception safe. If the metadata loading operation throws the reader
is not closed properly which in turn triggers assertion.

This commit fixes this by handling exception and closing the reader
explicitly. If the metadata can't be loaded (snapshot is truncated) the
method rethrows the exception.

Signed-off-by: Evgeny Lazin <4lazin@gmail.com>
(cherry picked from commit efb8b2a)
@vbotbuildovich vbotbuildovich added this to the v24.3.x-next milestone Jan 2, 2025
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jan 2, 2025
@vbotbuildovich vbotbuildovich requested a review from Lazin January 2, 2025 20:13
@vbotbuildovich
Copy link
Collaborator Author

vbotbuildovich commented Jan 2, 2025

Retry command for Build#60237

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



/ci-repeat 1
tests/rptest/tests/random_node_operations_test.py::RandomNodeOperationsTest.test_node_operations@{"cloud_storage_type":1,"enable_failures":false,"mixed_versions":true,"with_iceberg":false,"with_tiered_storage":false}
tests/rptest/tests/random_node_operations_test.py::RandomNodeOperationsTest.test_node_operations@{"cloud_storage_type":1,"enable_failures":true,"mixed_versions":true,"with_iceberg":false,"with_tiered_storage":false}
tests/rptest/tests/random_node_operations_test.py::RandomNodeOperationsTest.test_node_operations@{"cloud_storage_type":1,"enable_failures":false,"mixed_versions":true,"with_iceberg":false,"with_tiered_storage":true}
tests/rptest/tests/random_node_operations_test.py::RandomNodeOperationsTest.test_node_operations@{"cloud_storage_type":1,"enable_failures":true,"mixed_versions":true,"with_iceberg":false,"with_tiered_storage":true}

@vbotbuildovich
Copy link
Collaborator Author

vbotbuildovich commented Jan 3, 2025

CI test results

test results on build#60237
test_id test_kind job_url test_status passed
rptest.tests.random_node_operations_test.RandomNodeOperationsTest.test_node_operations.enable_failures=False.mixed_versions=True.with_tiered_storage=False.with_iceberg=False.cloud_storage_type=CloudStorageType.S3 ducktape https://buildkite.com/redpanda/redpanda/builds/60237#01942907-9670-4011-8efa-1aa23076433d FAIL 0/1
rptest.tests.random_node_operations_test.RandomNodeOperationsTest.test_node_operations.enable_failures=False.mixed_versions=True.with_tiered_storage=True.with_iceberg=False.cloud_storage_type=CloudStorageType.S3 ducktape https://buildkite.com/redpanda/redpanda/builds/60237#01942907-9672-4fb2-b797-21c4e3dd534b FAIL 0/1
rptest.tests.random_node_operations_test.RandomNodeOperationsTest.test_node_operations.enable_failures=True.mixed_versions=True.with_tiered_storage=False.with_iceberg=False.cloud_storage_type=CloudStorageType.S3 ducktape https://buildkite.com/redpanda/redpanda/builds/60237#01942907-9670-4011-8efa-1aa23076433d FAIL 0/6
rptest.tests.random_node_operations_test.RandomNodeOperationsTest.test_node_operations.enable_failures=True.mixed_versions=True.with_tiered_storage=True.with_iceberg=False.cloud_storage_type=CloudStorageType.S3 ducktape https://buildkite.com/redpanda/redpanda/builds/60237#01942907-9672-4fb2-b797-21c4e3dd534b FAIL 0/6
test results on build#60715
test_id test_kind job_url test_status passed
gtest_raft_rpunit.gtest_raft_rpunit unit https://buildkite.com/redpanda/redpanda/builds/60715#019465ba-8624-4c40-907a-2131a3d32f6d FLAKY 1/2
gtest_raft_rpunit.gtest_raft_rpunit unit https://buildkite.com/redpanda/redpanda/builds/60715#019465ba-8625-4b22-8248-a389d337578d FLAKY 1/2
rptest.tests.archive_retention_test.CloudArchiveRetentionTest.test_delete.cloud_storage_type=CloudStorageType.S3.retention_type=retention.ms ducktape https://buildkite.com/redpanda/redpanda/builds/60715#0194661a-1ddb-410b-b16f-fc0d35d96d89 FLAKY 3/6

@Lazin Lazin merged commit 6ca0b16 into redpanda-data:v24.3.x Jan 15, 2025
17 checks passed
@BenPope BenPope modified the milestones: v24.3.x-next, v24.3.4 Jan 23, 2025
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.

3 participants