You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by se...@apache.org on 2016/03/31 23:05:56 UTC

[1/2] incubator-trafodion git commit: TRAFODION-1910 mxosrvr crashes on Hive query after reconnect (take 2)

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master aa2681f26 -> e1c12dd31


TRAFODION-1910 mxosrvr crashes on Hive query after reconnect (take 2)

NATableDB is caching a pointer to a HiveClient_JNI object
(HiveMetaData::client_), but that object gets deallocated when a JDBC
client disconnects. Fixing this by keeping the HiveClient_JNI around
across sessions.

Selva and Suresh commented on the first fix and suggested to treat both
HBaseClient_JNI and HiveClient_JNI the same and to remove the CLI
interface that's used to delete these objects.

Therefore, the new fix is to remove this CLI call. It gets called from
two places, one is when an ODBC/JDBC connection closes and the other
is from "initialize trafodion, drop". We believe that neither of them
is needed. Note that we have only one object of each type per CLI
context, and that we delete both objects when we delete the context
(ContextCli::deleteMe()), so there are no leaks.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/841321a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/841321a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/841321a5

Branch: refs/heads/master
Commit: 841321a57d03343faf7d894ff8987ea677bde05b
Parents: 70b17ed
Author: Hans Zeller <hz...@apache.org>
Authored: Thu Mar 31 00:08:50 2016 +0000
Committer: Hans Zeller <hz...@apache.org>
Committed: Thu Mar 31 00:08:50 2016 +0000

----------------------------------------------------------------------
 core/sql/arkcmp/CmpStatement.cpp         |  2 --
 core/sql/cli/CliExtern.cpp               | 36 ---------------------------
 core/sql/cli/SQLCLIdev.h                 |  2 --
 core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp |  2 --
 4 files changed, 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/841321a5/core/sql/arkcmp/CmpStatement.cpp
----------------------------------------------------------------------
diff --git a/core/sql/arkcmp/CmpStatement.cpp b/core/sql/arkcmp/CmpStatement.cpp
index 377c33d..3eb0ecf 100644
--- a/core/sql/arkcmp/CmpStatement.cpp
+++ b/core/sql/arkcmp/CmpStatement.cpp
@@ -1311,8 +1311,6 @@ CmpStatement::process (const CmpMessageEndSession& es)
       CURRENTQCACHE->makeEmpty();
     }
 
-  SQL_EXEC_DeleteHbaseJNI();
-
   return CmpStatement_SUCCESS;
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/841321a5/core/sql/cli/CliExtern.cpp
----------------------------------------------------------------------
diff --git a/core/sql/cli/CliExtern.cpp b/core/sql/cli/CliExtern.cpp
index e5dd796..201c257 100644
--- a/core/sql/cli/CliExtern.cpp
+++ b/core/sql/cli/CliExtern.cpp
@@ -89,7 +89,6 @@ CLISemaphore globalSemaphore ;
 #include "SqlStats.h"
 #include "ComExeTrace.h"
 #include "Context.h"
-#include "HBaseClient_JNI.h"
 
 
 #ifndef CLI_PRIV_SRL
@@ -6301,41 +6300,6 @@ Lng32 SQL_EXEC_ResetParserFlagsForExSqlComp_Internal2(ULng32 flagbits)
    return retcode;
 }
 
-Lng32 SQL_EXEC_DeleteHbaseJNI()
-{
-   Lng32 retcode;
-   CLISemaphore *tmpSemaphore;
-   ContextCli   *threadContext;
-
-   CLI_NONPRIV_PROLOGUE(retcode);
-
-   try
-   {
-      tmpSemaphore = getCliSemaphore(threadContext);
-      tmpSemaphore->get();
-      threadContext->incrNumOfCliCalls();
-
-      HBaseClient_JNI::deleteInstance();
-      HiveClient_JNI::deleteInstance();
-   }
-   catch(...)
-   {
-     retcode = -CLI_INTERNAL_ERROR;
-#if defined(_THROW_EXCEPTIONS)
-     if (cliWillThrow())
-     {
-         threadContext->decrNumOfCliCalls();
-         tmpSemaphore->release();
-         throw;
-     }
-#endif
-   }
-   threadContext->decrNumOfCliCalls();
-   tmpSemaphore->release();
-
-   return retcode;
-}
-
 //LCOV_EXCL_START
 // For internal use only -- do not document!
 SQLCLI_LIB_FUNC const char *const *const

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/841321a5/core/sql/cli/SQLCLIdev.h
----------------------------------------------------------------------
diff --git a/core/sql/cli/SQLCLIdev.h b/core/sql/cli/SQLCLIdev.h
index 996540a..8cf2bde 100644
--- a/core/sql/cli/SQLCLIdev.h
+++ b/core/sql/cli/SQLCLIdev.h
@@ -83,8 +83,6 @@ Lng32 SQL_EXEC_AssignParserFlagsForExSqlComp_Internal(
 Lng32 SQL_EXEC_GetParserFlagsForExSqlComp_Internal(
 						      /*IN*/ ULng32 &flagbits);
 
-Lng32 SQL_EXEC_DeleteHbaseJNI();
-
 // For internal use only -- do not document!
 SQLCLI_LIB_FUNC short SQL_EXEC_GetDefaultVolume_Internal(
                 /*OUT*/ char  outBuf[],

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/841321a5/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp b/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
index c17b5ed..d4ce251 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
@@ -7625,8 +7625,6 @@ void CmpSeabaseDDL::dropSeabaseMD(NABoolean ddlXns)
   // drop all objects that match the pattern "TRAFODION.*"
   dropSeabaseObjectsFromHbase("TRAFODION\\..*", ddlXns);
 
-  SQL_EXEC_DeleteHbaseJNI();
-  
   //drop all lob data and descriptor files
   dropLOBHdfsFiles();
 


[2/2] incubator-trafodion git commit: Merge [TRAFODION-1910] PR-408 mxosrvr crashes on Hive query after reconnect

Posted by se...@apache.org.
Merge [TRAFODION-1910] PR-408 mxosrvr crashes on Hive query after reconnect


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/e1c12dd3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/e1c12dd3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/e1c12dd3

Branch: refs/heads/master
Commit: e1c12dd31f31bb79208cfc4aa3000c760aebbd8b
Parents: aa2681f 841321a
Author: selvaganesang <se...@apache.org>
Authored: Thu Mar 31 21:02:21 2016 +0000
Committer: selvaganesang <se...@apache.org>
Committed: Thu Mar 31 21:03:11 2016 +0000

----------------------------------------------------------------------
 core/sql/arkcmp/CmpStatement.cpp         |  2 --
 core/sql/cli/CliExtern.cpp               | 36 ---------------------------
 core/sql/cli/SQLCLIdev.h                 |  2 --
 core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp |  2 --
 4 files changed, 42 deletions(-)
----------------------------------------------------------------------