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

[1/2] incubator-trafodion git commit: Fix for regression failure caused because preCondition expression was not being generated for the code path with the new efficient tree. This caused deletes and inserts to compete and cause inconsistencies in the ind

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master a7a295e9b -> 965f6597f


Fix for regression failure caused because preCondition expression was not being generated for the code path with the new efficient tree. This caused deletes and inserts to compete and cause inconsistencies in the index depending on timing. Fix is to ensure the delete precondition is set for efficient upserts just like it is for updates and mergeUpdates.


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

Branch: refs/heads/master
Commit: bcb8bdb10a8fae0951d0652642096448f84a42d3
Parents: 95fe295
Author: Sandhya Sundaresan <sa...@apache.org>
Authored: Wed Feb 15 23:09:32 2017 +0000
Committer: Sandhya Sundaresan <sa...@apache.org>
Committed: Wed Feb 15 23:09:32 2017 +0000

----------------------------------------------------------------------
 core/sql/optimizer/Inlining.cpp        | 21 ++++++++++-----------
 core/sql/regress/seabase/DIFF025.KNOWN |  2 +-
 2 files changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/bcb8bdb1/core/sql/optimizer/Inlining.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/Inlining.cpp b/core/sql/optimizer/Inlining.cpp
index 01a249e..f90a560 100644
--- a/core/sql/optimizer/Inlining.cpp
+++ b/core/sql/optimizer/Inlining.cpp
@@ -1895,8 +1895,8 @@ static RelExpr *createIMNode(BindWA *bindWA,
                              const ValueId &mergeIUDIndicator,
 			     NABoolean isIMInsert,
 			     NABoolean useInternalSyskey,
-                             NABoolean isForUpdate,
-                             NABoolean isForMerge,
+                             NABoolean isForUpdateOrMergeUpdate,
+                             NABoolean isForMerge, // mergeDelete OR mergeUpdate
 			     NABoolean isEffUpsert)
 {
    
@@ -1946,11 +1946,11 @@ static RelExpr *createIMNode(BindWA *bindWA,
   // Index Type/IM operation->  Delete  | Insert
   // Non-unique Index           Yes        No 
   // Unique Index               Yes        Yes
-  if ((!isIMInsert && isForUpdate)||robustDelete )
+  if ((!isIMInsert && isForUpdateOrMergeUpdate)||robustDelete || (!isIMInsert && isEffUpsert))
     {
-      // For delete nodes that are part of an update, generate a
-      // comparison expression between old and new index column values
-      // and suppress the delete if no columns change. This avoids the
+      // For delete nodes that are part of an update or merge update or upsert,
+      // generate a comparison expression between old and new index column 
+      // values and suppress the delete if no columns change. This avoids the
       // situation where we delete and then re-insert the same index
       // row within one millisecond and get the same HBase timestamp
       // value assigned. In that case, the delete will win out over
@@ -2011,7 +2011,7 @@ static RelExpr *createIMNode(BindWA *bindWA,
                   (isIMInsert ? "D" : "I"),
                   CharInfo::ISO88591));
 
-      if (preCond == NULL)
+      if (preCond == NULL) 
         preCond = iudCond;
       else
         preCond = new (bindWA->wHeap()) BiLogic(
@@ -2104,9 +2104,8 @@ RelExpr *GenericUpdate::createIMNodes(BindWA *bindWA,
     indexCorrName.setIsVolatile(TRUE);
 
   RelExpr *indexInsert = NULL, *indexDelete = NULL, *indexOp = NULL;
-  NABoolean isForUpdate = (getOperatorType() == REL_UNARY_UPDATE ||
+  NABoolean isForUpdateOrMergeUpdate = (getOperatorType() == REL_UNARY_UPDATE ||
                            isMergeUpdate());
-  /* NABoolean isEffUpsert = ((CmpCommon::getDefault(TRAF_UPSERT_TO_EFF_TREE) == DF_ON ) && (getOperatorType() == REL_UNARY_INSERT && ((Insert*)this)->isUpsert()));*/
   
   NABoolean isEffUpsert = ((getOperatorType() == REL_UNARY_INSERT) && ((Insert *)this)->xformedEffUpsert());
   if (indexCorrName.getUgivenName().isNull())
@@ -2126,7 +2125,7 @@ RelExpr *GenericUpdate::createIMNodes(BindWA *bindWA,
                                          mergeIUDIndicator,
 					 TRUE,
 					 useInternalSyskey,
-                                         isForUpdate,
+                                         isForUpdateOrMergeUpdate,
                                          isMerge(),
 					 isEffUpsert);
 
@@ -2144,7 +2143,7 @@ RelExpr *GenericUpdate::createIMNodes(BindWA *bindWA,
                                          mergeIUDIndicator,
 					 FALSE,
     			       		 useInternalSyskey,
-                                         isForUpdate,
+                                         isForUpdateOrMergeUpdate,
                                          isMerge(),
 					 isEffUpsert);
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/bcb8bdb1/core/sql/regress/seabase/DIFF025.KNOWN
----------------------------------------------------------------------
diff --git a/core/sql/regress/seabase/DIFF025.KNOWN b/core/sql/regress/seabase/DIFF025.KNOWN
index 3fcffdc..e451495 100644
--- a/core/sql/regress/seabase/DIFF025.KNOWN
+++ b/core/sql/regress/seabase/DIFF025.KNOWN
@@ -1,4 +1,4 @@
-1568c1568
+1570c1570
 < 0
 ---
 > 1


[2/2] incubator-trafodion git commit: Merge remote branch 'origin/pr/959/head' into merge_959

Posted by sa...@apache.org.
Merge remote branch 'origin/pr/959/head' into merge_959


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

Branch: refs/heads/master
Commit: 965f6597f77ef034954b7ba209137822d4553587
Parents: a7a295e bcb8bdb
Author: Sandhya Sundaresan <sa...@apache.org>
Authored: Fri Feb 17 05:25:02 2017 +0000
Committer: Sandhya Sundaresan <sa...@apache.org>
Committed: Fri Feb 17 05:25:02 2017 +0000

----------------------------------------------------------------------
 core/sql/optimizer/Inlining.cpp        | 21 ++++++++++-----------
 core/sql/regress/seabase/DIFF025.KNOWN |  2 +-
 2 files changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------