]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge PR #30223 into master
authorSage Weil <sage@redhat.com>
Fri, 27 Sep 2019 00:28:51 +0000 (19:28 -0500)
committerSage Weil <sage@redhat.com>
Fri, 27 Sep 2019 00:28:51 +0000 (19:28 -0500)
* refs/pull/30223/head:
msg/async: do not register lossy client connections
msg/async: allow anonymous client-side connections

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
1  2 
src/msg/Connection.h
src/msg/async/AsyncConnection.h
src/msg/async/AsyncMessenger.cc
src/msg/async/ProtocolV1.cc
src/msg/async/ProtocolV2.cc

index 95f89fd19b8a701ac3767f1c62821c714e0c88f1,927e045bce7798cda18dc25cf3364422e2f8ef41..1532ce049196b6aa7c510b6c57fd9467928a3d90
@@@ -48,13 -50,14 +48,14 @@@ struct Connection : public RefCountedOb
    int64_t peer_id = -1;  // [msgr2 only] the 0 of osd.0, 4567 or client.4567
    safe_item_history<entity_addrvec_t> peer_addrs;
    utime_t last_keepalive, last_keepalive_ack;
+   bool anon = false;  ///< anonymous outgoing connection
  private:
 -  uint64_t features;
 +  uint64_t features = 0;
  public:
 -  bool is_loopback;
 -  bool failed; // true if we are a lossy connection that has failed.
 +  bool is_loopback = false;
 +  bool failed = false; // true if we are a lossy connection that has failed.
  
 -  int rx_buffers_version;
 +  int rx_buffers_version = 0;
    std::map<ceph_tid_t,std::pair<ceph::buffer::list, int>> rx_buffers;
  
    // authentication state
Simple merge
index 3556c4960f5bbc96d07e4109c11f85ed61a65cb1,362068caaeaf83d44abd0e88d7898dd0b6084869..514284b61a8b7fad46ddb95c941fd9ccd5d44e8a
@@@ -585,13 -585,18 +585,18 @@@ AsyncConnectionRef AsyncMessenger::crea
  
    // create connection
    Worker *w = stack->get_worker();
 -  AsyncConnectionRef conn = new AsyncConnection(cct, this, &dispatch_queue, w,
 +  auto conn = ceph::make_ref<AsyncConnection>(cct, this, &dispatch_queue, w,
                                                target.is_msgr2(), false);
+   conn->anon = anon;
    conn->connect(addrs, type, target);
-   ceph_assert(!conns.count(addrs));
-   ldout(cct, 10) << __func__ << " " << conn << " " << addrs << " "
-                << *conn->peer_addrs << dendl;
-   conns[addrs] = conn;
+   if (anon) {
+     anon_conns.insert(conn);
+   } else {
+     ceph_assert(!conns.count(addrs));
+     ldout(cct, 10) << __func__ << " " << conn << " " << addrs << " "
+                  << *conn->peer_addrs << dendl;
+     conns[addrs] = conn;
+   }
    w->get_perf_counter()->inc(l_msgr_active_connections);
  
    return conn;
Simple merge
Simple merge