kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danburk...@apache.org
Subject [2/4] kudu git commit: [rpc] fixed misprint in RegisterConnection
Date Tue, 08 Nov 2016 23:37:42 GMT
[rpc] fixed misprint in RegisterConnection

Fixed misprint in ReactorThread::RegisterConnection: do not put already
shut down connection into the server connection list.

Change-Id: Ifad34fa64caabebe265aea3c629657046b6818b5
Reviewed-on: http://gerrit.cloudera.org:8080/5003
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <todd@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/2fcbe181
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/2fcbe181
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/2fcbe181

Branch: refs/heads/master
Commit: 2fcbe1812459947cc09cb5dfb1ce640bccb3437b
Parents: 2fc0e2e
Author: Alexey Serbin <aserbin@cloudera.com>
Authored: Tue Nov 8 10:31:20 2016 -0800
Committer: Todd Lipcon <todd@apache.org>
Committed: Tue Nov 8 23:22:08 2016 +0000

----------------------------------------------------------------------
 src/kudu/rpc/reactor.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/2fcbe181/src/kudu/rpc/reactor.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/reactor.cc b/src/kudu/rpc/reactor.cc
index adc6f1a..e30a8b5 100644
--- a/src/kudu/rpc/reactor.cc
+++ b/src/kudu/rpc/reactor.cc
@@ -214,9 +214,10 @@ void ReactorThread::RegisterConnection(const scoped_refptr<Connection>&
conn) {
   DCHECK(IsCurrentThread());
 
   Status s = StartConnectionNegotiation(conn);
-  if (!s.ok()) {
+  if (PREDICT_FALSE(!s.ok())) {
     LOG(ERROR) << "Server connection negotiation failed: " << s.ToString();
     DestroyConnection(conn.get(), s);
+    return;
   }
   server_conns_.push_back(conn);
 }


Mime
View raw message