kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lid...@apache.org
Subject [01/22] kylin git commit: KYLIN-1992 Clear ThreadLocal Contexts when query failed before scaning HBase [Forced Update!]
Date Fri, 09 Sep 2016 02:52:58 GMT
Repository: kylin
Updated Branches:
  refs/heads/1.5.x-CDH5.7 c7d021661 -> c342110da (forced update)


KYLIN-1992 Clear ThreadLocal Contexts when query failed before scaning HBase

Signed-off-by: Hongbin Ma <mahongbin@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/663820f1
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/663820f1
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/663820f1

Branch: refs/heads/1.5.x-CDH5.7
Commit: 663820f1a267c9ff156ffbe018ac1d95a1ede7cc
Parents: 67bcec2
Author: kangkaisen <kangkaisen@live.com>
Authored: Thu Sep 1 16:02:42 2016 +0800
Committer: Hongbin Ma <mahongbin@apache.org>
Committed: Sun Sep 4 21:10:51 2016 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/kylin/rest/service/QueryService.java  | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/663820f1/server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java
----------------------------------------------------------------------
diff --git a/server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java b/server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java
index 3acaeb8..df296cf 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java
@@ -316,6 +316,8 @@ public class QueryService extends BasicService {
         parameters.put(OLAPContext.PRM_USER_AUTHEN_INFO, userInfo);
         parameters.put(OLAPContext.PRM_ACCEPT_PARTIAL_RESULT, String.valueOf(sqlRequest.isAcceptPartial()));
         OLAPContext.setParameters(parameters);
+        // force clear the query context before a new query
+        OLAPContext.clearThreadLocalContexts();
 
         return execute(correctedSql, sqlRequest);
 


Mime
View raw message