Skip to content

Commit

Permalink
Merge pull request #16706 from bharathv/fix_idem
Browse files Browse the repository at this point in the history
rm_stm/idempotency: fix the producer lock scope
  • Loading branch information
bharathv authored Feb 27, 2024
2 parents d846935 + def3776 commit a316400
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/v/cluster/rm_stm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,6 @@ ss::future<result<kafka_result>> rm_stm::do_idempotent_replicate(
req_ptr->set_value<ret_t>(errc::replication_error);
co_return errc::replication_error;
}
units.return_all();
enqueued->set_value();
auto replicated = co_await ss::coroutine::as_future(
std::move(stages.replicate_finished));
Expand All @@ -1182,6 +1181,7 @@ ss::future<result<kafka_result>> rm_stm::do_idempotent_replicate(
req_ptr->set_value<ret_t>(result.error());
co_return result.error();
}
units.return_all();
// translate to kafka offset.
auto kafka_offset = from_log_offset(result.value().last_offset);
auto final_result = kafka_result{.last_offset = kafka_offset};
Expand Down

0 comments on commit a316400

Please sign in to comment.