Skip to content

Commit

Permalink
storage: const& exception catch clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
WillemKauf committed Aug 26, 2024
1 parent 6ffe85f commit cccf7e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/v/storage/api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ ss::future<bool> api::wait_for_cluster_uuid() {
vassert(
_cluster_uuid.has_value(), "Expected cluster UUID after waiting");
co_return true;
} catch (ss::broken_condition_variable&) {
} catch (const ss::broken_condition_variable&) {
vlog(stlog.info, "Stopped waiting for cluster UUID");
}
co_return false;
Expand Down
6 changes: 3 additions & 3 deletions src/v/storage/segment_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ maybe_disable_cow(const std::filesystem::path& path, ss::file& file) {
vlog(stlog.trace, "Disabled COW on BTRFS segment {}", path);
}
}
} catch (std::filesystem::filesystem_error& e) {
} catch (const std::filesystem::filesystem_error& e) {
// This can happen if e.g. our file open races with an unlink
vlog(stlog.info, "Filesystem error disabling COW on {}: {}", path, e);
} catch (std::system_error& e) {
} catch (const std::system_error& e) {
// Non-fatal, user will just get degraded behaviour
// when btrfs tries to COW on a journal.
vlog(stlog.info, "System error disabling COW on {}: {}", path, e);
Expand Down Expand Up @@ -1017,7 +1017,7 @@ ss::future<std::vector<ss::rwlock::holder>> write_lock_segments(
}
held = co_await ss::when_all_succeed(held_f.begin(), held_f.end());
break;
} catch (ss::semaphore_timed_out&) {
} catch (const ss::semaphore_timed_out&) {
held.clear();
}
if (retries == 0) {
Expand Down

0 comments on commit cccf7e6

Please sign in to comment.