You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2016/05/27 17:46:30 UTC

[3/4] incubator-trafodion git commit: Rework number 2

Rework number 2


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

Branch: refs/heads/master
Commit: 16aa1431210ec8de3015f1f6905dc54f4802b532
Parents: cacb31e
Author: Dave Birdsall <db...@apache.org>
Authored: Fri May 27 15:34:36 2016 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Fri May 27 15:34:36 2016 +0000

----------------------------------------------------------------------
 core/sql/ustat/hs_globals.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/16aa1431/core/sql/ustat/hs_globals.cpp
----------------------------------------------------------------------
diff --git a/core/sql/ustat/hs_globals.cpp b/core/sql/ustat/hs_globals.cpp
index 67c29f5..50c15d5 100644
--- a/core/sql/ustat/hs_globals.cpp
+++ b/core/sql/ustat/hs_globals.cpp
@@ -560,10 +560,12 @@ NABoolean HSGlobalsClass::setHBaseCacheSize(double sampleRatio)
   else if (workableCacheSize > 50)
     workableCacheSize = 50; 
 
-  // if the user himself set the CQD, don't do anything
+  // Do this only if the user didn't set the CQD in this session
+  // (So, for example, if the CQD was set in the DEFAULTS table
+  // but not in this session, we'll still override it.)
   NADefaults &defs = ActiveSchemaDB()->getDefaults();
-  if (defs.getProvenance(HBASE_NUM_CACHE_ROWS_MAX) == 
-      NADefaults::INIT_DEFAULT_DEFAULTS)
+  if (defs.getProvenance(HBASE_NUM_CACHE_ROWS_MAX) < 
+      NADefaults::SET_BY_CQD)
     {
       char temp1[40];  // way more space than needed, but it's safe
       Lng32 wcs = (Lng32)workableCacheSize;