]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/net: make Dispatcher::ms_dispatch() a pure virtual interface
authorYingxin Cheng <yingxin.cheng@intel.com>
Fri, 27 Nov 2020 05:43:14 +0000 (13:43 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Mon, 30 Nov 2020 03:58:22 +0000 (11:58 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/net/Dispatcher.h
src/test/crimson/test_messenger.cc

index 7c39277f6b14e38a34b53f2b012a035d91963d39..e106f7a4b4e5fa5936eb6ffa83396059301afbde 100644 (file)
@@ -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<bool, seastar::future<>> ms_dispatch(Connection* conn, MessageRef m) {
-    return {false, seastar::now<>()};
-  }
+  virtual std::tuple<bool, seastar::future<>> ms_dispatch(Connection*, MessageRef) = 0;
 
   virtual void ms_handle_accept(ConnectionRef conn) {}
 
index 74c6aeadb3845378e6dadee9cc12da1c25febbb8..d50e082e16600fc4f2a65024ced2eee9186e0f3e 100644 (file)
@@ -308,6 +308,11 @@ static seastar::future<> test_concurrent_dispatch(bool v2)
       crimson::net::MessengerRef msgr;
       crimson::auth::DummyAuthClientServer dummy_auth;
 
+      std::tuple<bool, seastar::future<>> 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) {