File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ class Messenger {
5757
5858 virtual void set_auth_server (crimson::auth::AuthServer *) = 0;
5959
60+ virtual seastar::future<> mark_down (const entity_addr_t &addr) = 0;
61+
6062 using bind_ertr = crimson::errorator<
6163 crimson::ct_error::address_in_use, // The address (range) is already bound
6264 crimson::ct_error::address_not_available
Original file line number Diff line number Diff line change @@ -152,6 +152,18 @@ class SocketMessenger final : public Messenger {
152152 Interceptor *interceptor = nullptr ;
153153#endif
154154
155+ seastar::future<> mark_down (const entity_addr_t & a) final {
156+ auto conn = lookup_conn (a);
157+ if (conn) {
158+ return seastar::smp::submit_to (
159+ conn->get_shard_id (),
160+ [conn=conn.get ()] {
161+ conn->mark_down ();
162+ return seastar::now ();
163+ }).then ([conn] { return seastar::now (); });
164+ }
165+ return seastar::now ();
166+ }
155167private:
156168 seastar::future<> accept (SocketFRef &&, const entity_addr_t &);
157169
You can’t perform that action at this time.
0 commit comments