Skip to content

Commit 4fea3db

Browse files
committed
Provide more information when a Keeper Multi requests times out
1 parent 9cd5936 commit 4fea3db

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Common/ZooKeeper/ZooKeeper.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,15 @@ ZooKeeper::multiImpl(const Coordination::Requests & requests, Coordination::Resp
771771

772772
if (future_result.wait_for(std::chrono::milliseconds(args.operation_timeout_ms)) != std::future_status::ready)
773773
{
774-
impl->finalize(fmt::format("Operation timeout on {} {}", Coordination::OpNum::Multi, requests[0]->getPath()));
774+
#pragma clang diagnostic push
775+
#pragma clang diagnostic ignored "-Wpotentially-evaluated-expression"
776+
impl->finalize(fmt::format(
777+
"Operation timeout on {} of {} requests. First ({}): {}",
778+
Coordination::OpNum::Multi,
779+
requests.size(),
780+
demangle(typeid(*requests[0]).name()),
781+
requests[0]->getPath()));
782+
#pragma clang diagnostic pop
775783
return {Coordination::Error::ZOPERATIONTIMEOUT, ""};
776784
}
777785

0 commit comments

Comments
 (0)