]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MonClient: remove reopen_session() callback mechanism
authorIlya Dryomov <idryomov@gmail.com>
Thu, 22 Apr 2021 10:29:59 +0000 (12:29 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 22 Apr 2021 10:29:59 +0000 (12:29 +0200)
It's been unused for over 5 years, since commit 17d24292b812 ("osd:
remove old stats backoff mechanism").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/mon/MonClient.cc
src/mon/MonClient.h

index 0374cb091600ad451d8817c41fec73c4b1e86ae6..01eb1194aaf7a14991ef75dbaa2896ba16c05f85 100644 (file)
@@ -677,18 +677,6 @@ void MonClient::_finish_auth(int auth_err)
     _check_auth_tickets();
   }
   auth_cond.notify_all();
-
-  if (!auth_err) {
-    Context *cb = nullptr;
-    if (session_established_context) {
-      cb = session_established_context.release();
-    }
-    if (cb) {
-      monc_lock.unlock();
-      cb->complete(0);
-      monc_lock.lock();
-    }
-  }
 }
 
 // ---------
index cb16965450bf27f237828fccb99bf4da778ad309..c6ee6b8eb92fd3ced29ac01e0081eb0d81c59fef 100644 (file)
@@ -340,7 +340,6 @@ private:
 
   std::list<MessageRef> waiting_for_session;
   utime_t last_rotating_renew_sent;
-  std::unique_ptr<Context> session_established_context;
   bool had_a_connection;
   double reopen_interval_multiplier;
 
@@ -504,18 +503,9 @@ public:
     send_mon_message(MessageRef{m, false});
   }
   void send_mon_message(MessageRef m);
-  /**
-   * If you specify a callback, you should not call
-   * reopen_session() again until it has been triggered. The MonClient
-   * will behave, but the first callback could be triggered after
-   * the session has been killed and the MonClient has started trying
-   * to reconnect to another monitor.
-   */
-  void reopen_session(Context *cb=NULL) {
+
+  void reopen_session() {
     std::lock_guard l(monc_lock);
-    if (cb) {
-      session_established_context.reset(cb);
-    }
     _reopen_session();
   }