diff --git a/db/hints/internal/hint_sender.cc b/db/hints/internal/hint_sender.cc index ed8dbb901e..7157679e51 100644 --- a/db/hints/internal/hint_sender.cc +++ b/db/hints/internal/hint_sender.cc @@ -175,14 +175,14 @@ future<> hint_sender::stop(drain should_drain) noexcept { // // The next call for send_hints_maybe() will send the last hints to the current end point and when it is // done there is going to be no more pending hints and the corresponding hints directory may be removed. - manager_logger.trace("Draining for {}: start", end_point_key()); + manager_logger.info("Draining for {}: start", end_point_key()); set_draining(); send_hints_maybe(); _ep_manager.flush_current_hints().handle_exception([] (auto e) { manager_logger.error("Failed to flush pending hints: {}. Ignoring...", e); }).get(); send_hints_maybe(); - manager_logger.trace("Draining for {}: end", end_point_key()); + manager_logger.info("Draining for {}: end", end_point_key()); } // TODO: Change this log to match the class name, but first make sure no test // relies on the old one. diff --git a/db/hints/manager.cc b/db/hints/manager.cc index 637944a95d..185a8e76c5 100644 --- a/db/hints/manager.cc +++ b/db/hints/manager.cc @@ -539,7 +539,7 @@ future<> manager::change_host_filter(host_filter filter) { "change_host_filter: cannot change the configuration because hints all hints were drained"}); } - manager_logger.debug("change_host_filter: changing from {} to {}", _host_filter, filter); + manager_logger.info("change_host_filter: changing from {} to {}", _host_filter, filter); // Change the host_filter now and save the old one so that we can // roll back in case of failure @@ -611,11 +611,19 @@ future<> manager::change_host_filter(host_filter filter) { }); }); } catch (...) { + const sstring exception_message = eptr + ? seastar::format("{} + {}", eptr, std::current_exception()) + : seastar::format("{}", std::current_exception()); + + manager_logger.warn("Changing the host filter has failed: {}", exception_message); + if (eptr) { std::throw_with_nested(eptr); } throw; } + + manager_logger.info("The host filter has been changed successfully"); } bool manager::check_dc_for(endpoint_id ep) const noexcept { @@ -635,7 +643,7 @@ future<> manager::drain_for(endpoint_id host_id, gms::inet_address ip) noexcept co_return; } - manager_logger.trace("Draining starts for {}", host_id); + manager_logger.info("Draining starts for {}", host_id); const auto holder = seastar::gate::holder{_draining_eps_gate}; // As long as we hold on to this lock, no migration of hinted handoff to host IDs @@ -661,7 +669,7 @@ future<> manager::drain_for(endpoint_id host_id, gms::inet_address ip) noexcept return ep_man.with_file_update_mutex([&ep_man] -> future<> { return remove_file(ep_man.hints_dir().native()).then([&ep_man] { - manager_logger.debug("Removed hint directory for {}", ep_man.end_point_key()); + manager_logger.info("Removed hint directory for {}", ep_man.end_point_key()); }); }); }); @@ -722,7 +730,7 @@ future<> manager::drain_for(endpoint_id host_id, gms::inet_address ip) noexcept manager_logger.error("Exception when draining {}: {}", host_id, eptr); } - manager_logger.trace("drain_for: finished draining {}", host_id); + manager_logger.info("drain_for: finished draining {}", host_id); } void manager::update_backlog(size_t backlog, size_t max_backlog) {