From 060bcec94e57129daf2f1958a5c7a556a3d40f92 Mon Sep 17 00:00:00 2001 From: Yingxin Cheng Date: Fri, 27 Nov 2020 13:43:14 +0800 Subject: [PATCH] crimson/net: make Dispatcher::ms_dispatch() a pure virtual interface Signed-off-by: Yingxin Cheng --- src/crimson/net/Dispatcher.h | 4 +--- src/test/crimson/test_messenger.cc | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/crimson/net/Dispatcher.h b/src/crimson/net/Dispatcher.h index 7c39277f6b14e..e106f7a4b4e5f 100644 --- a/src/crimson/net/Dispatcher.h +++ b/src/crimson/net/Dispatcher.h @@ -36,9 +36,7 @@ class Dispatcher : public boost::intrusive::slist_base_hook< // to prevent other dispatchers from processing it, and returns a future // to throttle the connection if it's too busy. Else, it returns false and // the second future is ignored. - virtual std::tuple> ms_dispatch(Connection* conn, MessageRef m) { - return {false, seastar::now<>()}; - } + virtual std::tuple> ms_dispatch(Connection*, MessageRef) = 0; virtual void ms_handle_accept(ConnectionRef conn) {} diff --git a/src/test/crimson/test_messenger.cc b/src/test/crimson/test_messenger.cc index 74c6aeadb3845..d50e082e16600 100644 --- a/src/test/crimson/test_messenger.cc +++ b/src/test/crimson/test_messenger.cc @@ -308,6 +308,11 @@ static seastar::future<> test_concurrent_dispatch(bool v2) crimson::net::MessengerRef msgr; crimson::auth::DummyAuthClientServer dummy_auth; + std::tuple> ms_dispatch( + crimson::net::Connection* c, MessageRef m) override { + return {true, seastar::now()}; + } + seastar::future<> init(const entity_name_t& name, const std::string& lname, const uint64_t nonce) { -- 2.39.5