Skip to content

Commit

Permalink
kafka/s: Fix unclean restart between reset calls
Browse files Browse the repository at this point in the history
- Not calling `co_await` on mutex::get_units means no lock is actually
held.

- Fixes: #9647
  • Loading branch information
graphcareful committed Apr 7, 2023
1 parent 5a37b5d commit 9ded5ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/v/kafka/server/usage_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ ss::future<> usage_manager::reset() {
oncore_debug_verify(_verify_shard);
try {
auto h = _background_gate.hold();
auto u = _background_mutex.get_units();
auto u = co_await _background_mutex.get_units();
if (_accounting_fiber) {
/// Deallocate the accounting_fiber if the feature is disabled,
/// otherwise it will keep in memory the number of configured
Expand Down

0 comments on commit 9ded5ed

Please sign in to comment.