drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amansi...@apache.org
Subject [2/7] drill git commit: DRILL-5311: Check handshake result in C++ connector
Date Mon, 20 Mar 2017 15:56:55 GMT
DRILL-5311: Check handshake result in C++ connector

In C++ client connector, DrillClientImpl::recvHandshake always
return success, even in case of connection error (like a tcp
timeout issue). Only on WIN32 platform would the error code be
checked.

Remove the restriction to only check on WIN32, plus add some logging.

close apache/drill#770


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/97e2a1d1
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/97e2a1d1
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/97e2a1d1

Branch: refs/heads/master
Commit: 97e2a1d1d79ae963e8e67067241398580fee7e14
Parents: 8656c83
Author: Laurent Goujon <laurent@dremio.com>
Authored: Thu Mar 2 20:38:05 2017 -0800
Committer: Aman Sinha <asinha@maprtech.com>
Committed: Mon Mar 20 08:06:14 2017 -0700

----------------------------------------------------------------------
 contrib/native/client/src/clientlib/drillClientImpl.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/97e2a1d1/contrib/native/client/src/clientlib/drillClientImpl.cpp
----------------------------------------------------------------------
diff --git a/contrib/native/client/src/clientlib/drillClientImpl.cpp b/contrib/native/client/src/clientlib/drillClientImpl.cpp
index d768bf3..a41cb4b 100644
--- a/contrib/native/client/src/clientlib/drillClientImpl.cpp
+++ b/contrib/native/client/src/clientlib/drillClientImpl.cpp
@@ -274,11 +274,13 @@ connectionStatus_t DrillClientImpl::recvHandshake(){
     if(m_rbuf!=NULL){
         Utils::freeBuffer(m_rbuf, MAX_SOCK_RD_BUFSIZE); m_rbuf=NULL;
     }
-#ifdef WIN32_SHUTDOWN_ON_TIMEOUT
+
     if (m_pError != NULL) {
+        DRILL_MT_LOG(DRILL_LOG(LOG_ERROR) << "DrillClientImpl::recvHandshake: failed
to complete handshake with server."
+                    << m_pError->msg << "\n";)
         return static_cast<connectionStatus_t>(m_pError->status);
     }
-#endif // WIN32_SHUTDOWN_ON_TIMEOUT
+
     startHeartbeatTimer();
 
     return CONN_SUCCESS;


Mime
View raw message