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

[1/3] incubator-trafodion git commit: [TRAFODION-2616] Nested join regression after fix for TRAFODION-2569

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 7643e58b4 -> e96e2b8fc


[TRAFODION-2616] Nested join regression after fix for TRAFODION-2569

When pushing predicates into a scan node, it is not ok to copy the
index info of the original scan to the new scan node, since the
additional predicates may change the set of qualifying indexes.

Also, the method to copy the index info needs to copy the set of
computed predicates, since these are computed in the addIndexInfo()
method.


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

Branch: refs/heads/master
Commit: 84abd5c8c1821d4fb85c0f2ecdd68a46e1e2e58f
Parents: 790b04a
Author: Hans Zeller <hz...@apache.org>
Authored: Tue May 30 15:49:36 2017 +0000
Committer: Hans Zeller <hz...@apache.org>
Committed: Tue May 30 15:49:36 2017 +0000

----------------------------------------------------------------------
 core/sql/optimizer/RelExpr.cpp   | 2 ++
 core/sql/optimizer/TransRule.cpp | 8 +++-----
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84abd5c8/core/sql/optimizer/RelExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/RelExpr.cpp b/core/sql/optimizer/RelExpr.cpp
index d10d3c3..0846e80 100644
--- a/core/sql/optimizer/RelExpr.cpp
+++ b/core/sql/optimizer/RelExpr.cpp
@@ -8348,6 +8348,7 @@ void Scan::copyIndexInfo(RelExpr *derivedNode)
       indexOnlyIndexes_.insert(ixDescs[j]);
     }
   }
+  generatedCCPreds_ = scan->generatedCCPreds_;
 }
 
 void Scan::removeIndexInfo()
@@ -8355,6 +8356,7 @@ void Scan::removeIndexInfo()
 	possibleIndexJoins_.clear();
 	indexOnlyIndexes_.clear();
         indexJoinScans_.clear();
+        generatedCCPreds_.clear();
 	forcedIndexInfo_ = FALSE;
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84abd5c8/core/sql/optimizer/TransRule.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/TransRule.cpp b/core/sql/optimizer/TransRule.cpp
index 8a4aeb5..9b55366 100644
--- a/core/sql/optimizer/TransRule.cpp
+++ b/core/sql/optimizer/TransRule.cpp
@@ -3494,16 +3494,14 @@ RelExpr * FilterRule0::nextSubstitute(RelExpr * before,
   // copy the tree underneath the filter
   result = getSubstitute()->copyTree(CmpCommon::statementHeap());
 
-  // if the original child of the filter is a scan, then also copy
-  // index information to prevent enumerating potential index joins again.
-  if ((leafNode->getOperatorType() == REL_SCAN))
-    ((Scan *)result)->copyIndexInfo(leafNode);
-
   // now set the group attributes of the result's top node
   result->setGroupAttr(before->getGroupAttr());
 
   result->selectionPred() += bef->selectionPred();
 
+  if ((leafNode->getOperatorType() == REL_SCAN))
+    ((Scan *)result)->addIndexInfo();
+
   return result;
 }
 


[2/3] incubator-trafodion git commit: [TRAFODION-2625] Memory "leak" for large TMUDFs

Posted by hz...@apache.org.
[TRAFODION-2625] Memory "leak" for large TMUDFs

This is not a leak in the strict sense, as the memory gets deallocated
once the UDF finishes, but for UDFs that read or produce many rows, we
need to call method IpcBufferedMsgStream::cleanupBuffers() while the
UDF is executing. Otherwise, none of the reply buffers used will be
deallocated until the end. I've seen up to 20 GB of buffers being held
that way.


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

Branch: refs/heads/master
Commit: 18edb52790571842c7d159e3fe38925755c93632
Parents: 84abd5c
Author: Hans Zeller <hz...@apache.org>
Authored: Tue May 30 16:04:36 2017 +0000
Committer: Hans Zeller <hz...@apache.org>
Committed: Tue May 30 16:04:36 2017 +0000

----------------------------------------------------------------------
 core/sql/udrserv/udrserv.cpp | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/18edb527/core/sql/udrserv/udrserv.cpp
----------------------------------------------------------------------
diff --git a/core/sql/udrserv/udrserv.cpp b/core/sql/udrserv/udrserv.cpp
index fa84d01..fef9d4d 100644
--- a/core/sql/udrserv/udrserv.cpp
+++ b/core/sql/udrserv/udrserv.cpp
@@ -2850,6 +2850,9 @@ Int32 PerformWaitedReplyToClient(UdrGlobals *UdrGlob,
 
   sendDataReply(UdrGlob, msgStream, NULL);
 
+  // cleanup no longer used buffers
+  msgStream.cleanupBuffers();
+
   //Note down the current sp so that we can restore it back
   //once ProcessARequest() call is complete. There are scenarios
   //in ProcessARequest to reset spInfo in udrGlobals once Spinfo


[3/3] incubator-trafodion git commit: Merge [TRAFODION-2616] Nested join regression after fix for TRAFODION-2569 PR-1104

Posted by hz...@apache.org.
Merge [TRAFODION-2616] Nested join regression after fix for TRAFODION-2569 PR-1104


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

Branch: refs/heads/master
Commit: e96e2b8fce31686e05d648c86588fac9882abaf5
Parents: 7643e58 18edb52
Author: Hans Zeller <hz...@apache.org>
Authored: Wed May 31 23:34:24 2017 +0000
Committer: Hans Zeller <hz...@apache.org>
Committed: Wed May 31 23:34:24 2017 +0000

----------------------------------------------------------------------
 core/sql/optimizer/RelExpr.cpp   | 2 ++
 core/sql/optimizer/TransRule.cpp | 8 +++-----
 core/sql/udrserv/udrserv.cpp     | 3 +++
 3 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------