From 3deac5e3d83556b90b793f9c836888829cbe12b7 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 6 Jul 2024 15:08:29 +0800 Subject: [PATCH] rpc: pass start time to `wait_for_reply()` which accepts `no_wait_type` in 41ee6eeb, we enable the client to calculate the delay by passing the start time point to `wait_for_reply()`, but there are three overloads of `wait_for_reply()` - for wait_type - for no_wait - for future in 41ee6eeb, we updated the first two of them. but missed the last one. and this breaks the build of scylladb, if it is built with the seastar including the said commit. as scylladb actually uses the 3rd overload. the compiler errors out, like ``` /usr/bin/clang++ -DDEVEL -DFMT_SHARED -DSCYLLA_BUILD_MODE=dev -DSCYLLA_ENABLE_ERROR_INJECTION -DSEASTAR_API_LEVEL=7 -DSEASTAR_ENABLE_ALLOC_FAILURE_INJECTION -DSEASTAR_LOGGER_COMPILE_TIME_FMT -DSEASTAR_LOGGER_TYPE_STDOUT -DSEASTAR_SCHEDULING_GROUPS_COUNT=16 -DSEASTAR_SSTRING -DSEASTAR_TYPE_ERASE_MORE -DXXH_PRIVATE_API -I/__w/scylladb/scylladb -I/__w/scylladb/scylladb/seastar/include -I/__w/scylladb/scylladb/build/seastar/gen/include -I/__w/scylladb/scylladb/build/seastar/gen/src -I/__w/scylladb/scylladb/build/gen -isystem /__w/scylladb/scylladb/abseil -O2 -std=gnu++23 -fvisibility=hidden -Wall -Werror -Wextra -Wno-error=deprecated-declarations -Wimplicit-fallthrough -Wno-c++11-narrowing -Wno-deprecated-copy -Wno-mismatched-tags -Wno-missing-field-initializers -Wno-overloaded-virtual -Wno-unsupported-friend -Wno-enum-constexpr-conversion -Wno-unused-parameter -ffile-prefix-map=/__w/scylladb/scylladb=. -march=westmere -U_FORTIFY_SOURCE -Werror=unused-result -fstack-clash-protection -MD -MT message/CMakeFiles/message.dir/messaging_service.cc.o -MF message/CMakeFiles/message.dir/messaging_service.cc.o.d -o message/CMakeFiles/message.dir/messaging_service.cc.o -c /__w/scylladb/scylladb/message/messaging_service.cc In file included from /__w/scylladb/scylladb/message/messaging_service.cc:23: In file included from /__w/scylladb/scylladb/seastar/include/seastar/rpc/rpc.hh:973: /__w/scylladb/scylladb/seastar/include/seastar/rpc/rpc_impl.hh:484:97: error: no matching function for call to 'wait_for_reply' 484 | return when_all(dst.request(uint64_t(t), msg_id, std::move(data), timeout, cancel), wait_for_reply(wait(), timeout, start, cancel, dst, msg_id, sig)).then([] (auto r) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ /__w/scylladb/scylladb/seastar/include/seastar/rpc/rpc_impl.hh:468:12: note: in instantiation of member function 'seastar::rpc::send_helper(netw::messaging_verb, signature (tagged_uuid, tagged_uuid, tagged_uuid, append_request)>)::shelper::send' requested here 468 | struct shelper { | ^ /__w/scylladb/scylladb/seastar/include/seastar/rpc/rpc_impl.hh:664:12: note: in instantiation of function template specialization 'seastar::rpc::send_helper, utils::tagged_uuid, utils::tagged_uuid, utils::tagged_uuid, raft::append_request>' requested here 664 | return send_helper(t, sig_type()); | ^ ``` so, in this change, we pass a unused start timepoint to the 3rd overload. after this change, scylla builds with seastar just fine. Refs 41ee6eeb596723f93132fd50e054941236c7cab8 Signed-off-by: Kefu Chai --- include/seastar/rpc/rpc_impl.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/seastar/rpc/rpc_impl.hh b/include/seastar/rpc/rpc_impl.hh index 2f25763ab98..f57f01529fc 100644 --- a/include/seastar/rpc/rpc_impl.hh +++ b/include/seastar/rpc/rpc_impl.hh @@ -442,7 +442,7 @@ inline auto wait_for_reply(no_wait_type, std::optional -inline auto wait_for_reply(no_wait_type, std::optional, cancellable*, rpc::client&, id_type, +inline auto wait_for_reply(no_wait_type, std::optional, rpc_clock_type::time_point, cancellable*, rpc::client&, id_type, signature (InArgs...)>) { // future overload return make_ready_future<>(); }