Skip to content

Commit

Permalink
schema_registry/seq_writer: Avoid unhandled exception
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Pope <ben@redpanda.com>
  • Loading branch information
BenPope committed May 13, 2024
1 parent 282854b commit 8b0915f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/v/pandaproxy/schema_registry/seq_writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,12 @@ seq_writer::do_delete_subject_impermanent(subject sub, model::offset write_at) {
delete_subject_key{.seq{write_at}, .node{_node_id}, .sub{sub}},
delete_subject_value{.sub{sub}});

auto conf = co_await ss::coroutine::as_future(
_store.get_subject_config_written_at(sub));
if (!conf.failed()) {
rb(conf.get());
try {
rb(co_await _store.get_subject_config_written_at(sub));
} catch (exception const& e) {
if (e.code() != error_code::subject_not_found) {
throw;
}
}

if (co_await produce_and_apply(write_at, std::move(rb).build())) {
Expand Down

0 comments on commit 8b0915f

Please sign in to comment.