Skip to content

ct/frontend: co_await in do_load_slice#30176

Open
nvartolomei wants to merge 1 commit intodevfrom
nv/ct-fix-do-load-slice-coroutine
Open

ct/frontend: co_await in do_load_slice#30176
nvartolomei wants to merge 1 commit intodevfrom
nv/ct-fix-do-load-slice-coroutine

Conversation

@nvartolomei
Copy link
Copy Markdown
Contributor

Use co_return/co_await instead of plain return so that exceptions from read_some are caught by the surrounding try/catch block.

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

Release Notes

  • none

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates cloud topics frontend log readers so that exceptions originating from read_some() are caught by the local try/catch in do_load_slice(), by converting the call path to use C++ coroutines (co_await/co_return).

Changes:

  • Update level_zero_log_reader_impl::do_load_slice() to co_await the read_some() future so exceptions are handled by the surrounding try/catch.
  • Update level_one_log_reader_impl::do_load_slice() similarly.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/v/cloud_topics/level_zero/frontend_reader/level_zero_reader.cc Switch do_load_slice() to co_return co_await read_some(...) so read_some exceptions are caught/logged before rethrow.
src/v/cloud_topics/level_one/frontend_reader/level_one_reader.cc Same coroutine conversion in do_load_slice() to ensure exception handling works as intended.

wdberkeley
wdberkeley previously approved these changes Apr 15, 2026
@vbotbuildovich
Copy link
Copy Markdown
Collaborator

vbotbuildovich commented Apr 15, 2026

Retry command for Build#83191

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

/ci-repeat 1
skip-redpanda-build
skip-units
skip-rebase
tests/rptest/tests/write_caching_fi_e2e_test.py::WriteCachingFailureInjectionE2ETest.test_crash_all@{"use_transactions":false}
tests/rptest/tests/random_node_operations_smoke_test.py::RedpandaNodeOperationsSmokeTest.test_node_ops_smoke_test@{"cloud_storage_type":1,"mixed_versions":false}
tests/rptest/tests/cloud_topics/l0_gc_test.py::CloudTopicsL0GCStressTest.test_gc_stress@{"cloud_storage_type":1}

@vbotbuildovich
Copy link
Copy Markdown
Collaborator

vbotbuildovich commented Apr 15, 2026

CI test results

test results on build#83191
test_status test_class test_method test_arguments test_kind job_url passed reason test_history
FAIL CloudTopicsL0GCStressTest test_gc_stress {"cloud_storage_type": 1} integration https://buildkite.com/redpanda/redpanda/builds/83191#019d9268-eef6-4731-8fcc-0db359e34872 0/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0000, p0=0.0000, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=CloudTopicsL0GCStressTest&test_method=test_gc_stress
FLAKY(FAIL) RedpandaNodeOperationsSmokeTest test_node_ops_smoke_test {"cloud_storage_type": 1, "mixed_versions": false} integration https://buildkite.com/redpanda/redpanda/builds/83191#019d9267-1935-4bec-9fa2-ff3869030030 1/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0033, p0=0.0000, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=RedpandaNodeOperationsSmokeTest&test_method=test_node_ops_smoke_test
FLAKY(FAIL) RedpandaNodeOperationsSmokeTest test_node_ops_smoke_test {"cloud_storage_type": 1, "mixed_versions": false} integration https://buildkite.com/redpanda/redpanda/builds/83191#019d9268-eef3-448d-9654-4ed7c6aee072 4/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0033, p0=0.0000, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=RedpandaNodeOperationsSmokeTest&test_method=test_node_ops_smoke_test
FLAKY(FAIL) WriteCachingFailureInjectionE2ETest test_crash_all {"use_transactions": false} integration https://buildkite.com/redpanda/redpanda/builds/83191#019d9268-eef5-4e55-81e2-4867b6b9a9d4 6/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0683, p0=0.0033, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=WriteCachingFailureInjectionE2ETest&test_method=test_crash_all
test results on build#83203
test_status test_class test_method test_arguments test_kind job_url passed reason test_history
FAIL CloudTopicsL0GCStressTest test_gc_stress {"cloud_storage_type": 1} integration https://buildkite.com/redpanda/redpanda/builds/83203#019d933e-9461-4eda-8a22-70fa09cd80cb 0/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0000, p0=0.0000, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=CloudTopicsL0GCStressTest&test_method=test_gc_stress
FAIL RedpandaNodeOperationsSmokeTest test_node_ops_smoke_test {"cloud_storage_type": 1, "mixed_versions": false} integration https://buildkite.com/redpanda/redpanda/builds/83203#019d933c-a83f-4d3b-9fb4-10d3517fe477 0/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0032, p0=0.0000, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=RedpandaNodeOperationsSmokeTest&test_method=test_node_ops_smoke_test
FLAKY(FAIL) RedpandaNodeOperationsSmokeTest test_node_ops_smoke_test {"cloud_storage_type": 1, "mixed_versions": false} integration https://buildkite.com/redpanda/redpanda/builds/83203#019d933e-9460-49f8-b1e4-b6e15868a9a2 5/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0032, p0=0.0000, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=RedpandaNodeOperationsSmokeTest&test_method=test_node_ops_smoke_test

@vbotbuildovich
Copy link
Copy Markdown
Collaborator

vbotbuildovich commented Apr 15, 2026

Retry command for Build#83203

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

/ci-repeat 1
skip-redpanda-build
skip-units
skip-rebase
tests/rptest/tests/cloud_topics/l0_gc_test.py::CloudTopicsL0GCStressTest.test_gc_stress@{"cloud_storage_type":1}
tests/rptest/tests/random_node_operations_smoke_test.py::RedpandaNodeOperationsSmokeTest.test_node_ops_smoke_test@{"cloud_storage_type":1,"mixed_versions":false}

Use co_return/co_await instead of plain return so that exceptions from
read_some are caught by the surrounding try/catch block.

Log at debug level since exceptions here are not necessarily software
errors — the caller may have triggered an abort source.
@nvartolomei nvartolomei force-pushed the nv/ct-fix-do-load-slice-coroutine branch from 3cbd0d6 to a6265a5 Compare April 16, 2026 13:22
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.

4 participants