From 5443bf69f751dedbfb9acb8116fe7e190c967f36 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 11 Jul 2023 18:30:17 +0800 Subject: [PATCH] storage_proxy: print the expected ex.what() before this change, the format string contains two placeholders, but only one extra argument is passed in. if we actually format this logging message, fmtlib would throw. after this change, we pass the exception's error message as yet another argument. this logging message is printed with "trace" level, guess that's why we haven't have the exception thrown by fmtlib. Signed-off-by: Kefu Chai Closes #14628 --- service/storage_proxy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/storage_proxy.cc b/service/storage_proxy.cc index a472b4d217..5c2b1d5246 100644 --- a/service/storage_proxy.cc +++ b/service/storage_proxy.cc @@ -6123,7 +6123,7 @@ future storage_proxy::cas(schema_ptr schema, shared_ptr reque write ? get_stats().cas_write_unavailables.mark() : get_stats().cas_read_unavailables.mark(); throw; } catch (seastar::semaphore_timed_out& ex) { - paxos::paxos_state::logger.trace("CAS[{}]: timeout while waiting for row lock {}", handler->id()); + paxos::paxos_state::logger.trace("CAS[{}]: timeout while waiting for row lock {}", handler->id(), ex.what()); if (write) { get_stats().cas_write_timeouts.mark(); throw mutation_write_timeout_exception(schema->ks_name(), schema->cf_name(), cl_for_paxos, 0, handler->block_for(), db::write_type::CAS);