]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: clear Sessions for loopback Connections on shutdown
authorSage Weil <sage@inktank.com>
Tue, 1 Jul 2014 21:31:11 +0000 (14:31 -0700)
committerSage Weil <sage@inktank.com>
Mon, 7 Jul 2014 22:12:10 +0000 (15:12 -0700)
Starting with the fast dispatch patches, we are calling the handle_connect
on loopback.  Make sure we zap them on shutdown to break the Session <->
Connection ref cycle.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/OSD.cc

index 7010cf04ed9bf9feb4e959116a2d634df2aa9a01..0087e9b57a9f7c49a6852cbe68955a4432329ad4 100644 (file)
@@ -1764,6 +1764,10 @@ int OSD::shutdown()
   service.shutdown();
   op_tracker.on_shutdown();
 
+  // zap the Sessions for any loopback Connections
+  client_messenger->get_loopback_connection()->set_priv(NULL);
+  cluster_messenger->get_loopback_connection()->set_priv(NULL);
+
   class_handler->shutdown();
   client_messenger->shutdown();
   cluster_messenger->shutdown();
@@ -3690,7 +3694,7 @@ void OSD::ms_handle_fast_connect(Connection *con)
       s = new Session;
       con->set_priv(s->get());
       s->con = con;
-      dout(10) << " new session (outgoing)" << s << " con=" << s->con
+      dout(10) << " new session (outgoing) " << s << " con=" << s->con
           << " addr=" << s->con->get_peer_addr() << dendl;
       // we don't connect to clients
       assert(con->get_peer_type() == CEPH_ENTITY_TYPE_OSD);