]> 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>
Sun, 25 Apr 2021 10:16:47 +0000 (12:16 +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>
(cherry picked from commit 853c04b5a66721755830c5b46b695f6c86cb406b)

Conflicts:
src/mon/MonClient.cc [ commit 85157d5aae3d ("mon:
  s/Mutex/ceph::mutex/") not in nautilus ]
src/mon/MonClient.h [ commit a144cacdd88b ("mon/MonClient:
  add send_mon_message(MessageRef)") not in nautilus ]

src/mon/MonClient.cc
src/mon/MonClient.h

index a0a6acd1dc6455a9246c566ad9f8bc5e0fd1f907..8dd39dfa41692894bdd48b2eeb798faa4dd9137e 100644 (file)
@@ -612,18 +612,6 @@ void MonClient::_finish_auth(int auth_err)
     _check_auth_tickets();
   }
   auth_cond.SignalAll();
-
-  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 abdcd315ad056ff0d180b2527a5d60bdac1dad52..fb9d8be6da0dc5840f1e82b49827fa1ffb431bbc 100644 (file)
@@ -287,7 +287,6 @@ private:
 
   list<Message*> waiting_for_session;
   utime_t last_rotating_renew_sent;
-  std::unique_ptr<Context> session_established_context;
   bool had_a_connection;
   double reopen_interval_multiplier;
 
@@ -449,18 +448,9 @@ public:
     std::lock_guard l(monc_lock);
     _send_mon_message(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();
   }