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 2017/07/04 20:02:26 UTC
[1/2] incubator-trafodion git commit: [TRAFODION-2662] Remove some
non-determinism from compGeneral/TEST023
Repository: incubator-trafodion
Updated Branches:
refs/heads/master 72bf9b738 -> b0392f452
[TRAFODION-2662] Remove some non-determinism from compGeneral/TEST023
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/8dbae2c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/8dbae2c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/8dbae2c6
Branch: refs/heads/master
Commit: 8dbae2c6ea835cb6bcb1bc753c95aa1757301a2e
Parents: e1edb7d
Author: Dave Birdsall <db...@apache.org>
Authored: Mon Jul 3 23:31:39 2017 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Mon Jul 3 23:31:39 2017 +0000
----------------------------------------------------------------------
core/sql/regress/compGeneral/EXPECTED023 | 50 +++++++++++++--------------
core/sql/ustat/hs_globals.cpp | 21 ++++++++---
2 files changed, 42 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8dbae2c6/core/sql/regress/compGeneral/EXPECTED023
----------------------------------------------------------------------
diff --git a/core/sql/regress/compGeneral/EXPECTED023 b/core/sql/regress/compGeneral/EXPECTED023
index 6245669..180a962 100644
--- a/core/sql/regress/compGeneral/EXPECTED023
+++ b/core/sql/regress/compGeneral/EXPECTED023
@@ -125,7 +125,7 @@ STEST_EMPTY
OBJECT_NAME SAMPLE_NAME REASON LAST_WHERE_PREDICATE
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-STEST TRAFODION.COMPGENERAL_TEST023.TRAF_SAMPLE_28_1498938882_957928 M
+STEST TRAFODION.COMPGENERAL_TEST023.TRAF_SAMPLE_08256920717490504707_1499123202_644772 M
--- 1 row(s) selected.
>>-- should see one row
@@ -141,7 +141,7 @@ SB_PERSISTENT_SAMPLES
STEST
STESTC
STEST_EMPTY
-TRAF_SAMPLE_28_1498938882_957928
+TRAF_SAMPLE_08256920717490504707_1499123202_644772
--- SQL operation complete.
>> -- should be stest, stest_empty, stestc, sb_* tables + a sample table
@@ -165,7 +165,7 @@ SB_PERSISTENT_SAMPLES
STEST
STESTC
STEST_EMPTY
-TRAF_SAMPLE_66_1498938923_301766
+TRAF_SAMPLE_08256920717490504707_1499123287_739643
--- SQL operation complete.
>> -- should be stest, stest_empty, stestc, sb_* tables + a different sample table
@@ -175,7 +175,7 @@ TRAF_SAMPLE_66_1498938923_301766
OBJECT_NAME SAMPLE_NAME REASON LAST_WHERE_PREDICATE
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-STEST TRAFODION.COMPGENERAL_TEST023.TRAF_SAMPLE_66_1498938923_301766 M
+STEST TRAFODION.COMPGENERAL_TEST023.TRAF_SAMPLE_08256920717490504707_1499123287_739643 M
--- 1 row(s) selected.
>>-- should see one row
@@ -222,7 +222,7 @@ SB_PERSISTENT_SAMPLES
STEST
STESTC
STEST_EMPTY
-TRAF_SAMPLE_96_1498938956_797796
+TRAF_SAMPLE_08256920717490504707_1499123343_842843
--- SQL operation complete.
>> -- should be stest, stest_empty, stestc, sb_* tables + another sample table
@@ -232,7 +232,7 @@ TRAF_SAMPLE_96_1498938956_797796
OBJECT_NAME SAMPLE_NAME REASON LAST_WHERE_PREDICATE
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-STEST TRAFODION.COMPGENERAL_TEST023.TRAF_SAMPLE_96_1498938956_797796 I
+STEST TRAFODION.COMPGENERAL_TEST023.TRAF_SAMPLE_08256920717490504707_1499123343_842843 I
--- 1 row(s) selected.
>>-- should see one row
@@ -256,7 +256,7 @@ SB_PERSISTENT_SAMPLES
STEST
STESTC
STEST_EMPTY
-TRAF_SAMPLE_95_1498938997_236495
+TRAF_SAMPLE_08256920717490504707_1499123383_331045
--- SQL operation complete.
>> -- should be stest, stest_empty, stestc, sb_* tables + another sample table
@@ -266,7 +266,7 @@ TRAF_SAMPLE_95_1498938997_236495
OBJECT_NAME SAMPLE_NAME REASON LAST_WHERE_PREDICATE
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-STEST TRAFODION.COMPGENERAL_TEST023.TRAF_SAMPLE_95_1498938997_236495 I
+STEST TRAFODION.COMPGENERAL_TEST023.TRAF_SAMPLE_08256920717490504707_1499123383_331045 I
--- 1 row(s) selected.
>>-- should see one row
@@ -327,7 +327,7 @@ STEST
OBJECT_NAME SAMPLE_NAME REASON LAST_WHERE_PREDICATE
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-STEST TRAFODION.COMPGENERAL_TEST023.TRAF_SAMPLE_95_1498938997_236495 I c1 >= 100000
+STEST TRAFODION.COMPGENERAL_TEST023.TRAF_SAMPLE_08256920717490504707_1499123383_331045 I c1 >= 100000
--- 1 row(s) selected.
>>
@@ -384,8 +384,8 @@ SB_PERSISTENT_SAMPLES
STEST
STESTC
STEST_EMPTY
-TRAF_SAMPLE_61_1498939068_810961
-TRAF_SAMPLE_95_1498938997_236495
+TRAF_SAMPLE_08256920717490504707_1499123383_331045
+TRAF_SAMPLE_08256920717490506747_1499123452_066783
--- SQL operation complete.
>>
@@ -394,7 +394,7 @@ TRAF_SAMPLE_95_1498938997_236495
OBJECT_NAME SAMPLE_NAME REASON LAST_WHERE_PREDICATE
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-STESTC TRAFODION.COMPGENERAL_TEST023.TRAF_SAMPLE_61_1498939068_810961 I c1 >= 'naaaa'
+STESTC TRAFODION.COMPGENERAL_TEST023.TRAF_SAMPLE_08256920717490506747_1499123452_066783 I c1 >= 'naaaa'
--- 1 row(s) selected.
>>
@@ -419,8 +419,8 @@ SB_PERSISTENT_SAMPLES
STEST
STESTC
STEST_EMPTY
-TRAF_SAMPLE_61_1498939068_810961
-TRAF_SAMPLE_95_1498938997_236495
+TRAF_SAMPLE_08256920717490504707_1499123383_331045
+TRAF_SAMPLE_08256920717490506747_1499123452_066783
--- SQL operation complete.
>> -- should be the same as previous "get tables"
@@ -447,8 +447,8 @@ SB_PERSISTENT_SAMPLES
STEST
STESTC
STEST_EMPTY
-TRAF_SAMPLE_61_1498939068_810961
-TRAF_SAMPLE_95_1498938997_236495
+TRAF_SAMPLE_08256920717490504707_1499123383_331045
+TRAF_SAMPLE_08256920717490506747_1499123452_066783
--- SQL operation complete.
>> -- should be the same as previous "get tables"
@@ -476,8 +476,8 @@ SB_PERSISTENT_SAMPLES
STEST
STESTC
STEST_EMPTY
-TRAF_SAMPLE_61_1498939068_810961
-TRAF_SAMPLE_95_1498938997_236495
+TRAF_SAMPLE_08256920717490504707_1499123383_331045
+TRAF_SAMPLE_08256920717490506747_1499123452_066783
--- SQL operation complete.
>> -- should be the same as previous "get tables"
@@ -488,10 +488,10 @@ TRAF_SAMPLE_95_1498938997_236495
*** ERROR[9219] Incremental UPDATE STATISTICS: An operation failed, possibly due to an invalid WHERE clause.
*** ERROR[15001] A syntax error occurred at or before:
-UPSERT USING LOAD INTO TRAFODION.COMPGENERAL_TEST023.TRAF_SAMPLE_95_1498938997_
-236495_I (SELECT * FROM TRAFODION.COMPGENERAL_TEST023.STEST WHERE 1 SAMPLE RA
-NDOM 10.056000 PERCENT );
- ^ (162 characters from start of SQL statement)
+UPSERT USING LOAD INTO TRAFODION.COMPGENERAL_TEST023.TRAF_SAMPLE_08256920717490
+504707_1499123383_331045_I (SELECT * FROM TRAFODION.COMPGENERAL_TEST023.STEST W
+HERE 1 SAMPLE RANDOM 9.963000 PERCENT );
+ ^ (180 characters from start of SQL statement)
*** ERROR[8822] The statement was not prepared.
@@ -508,8 +508,8 @@ SB_PERSISTENT_SAMPLES
STEST
STESTC
STEST_EMPTY
-TRAF_SAMPLE_61_1498939068_810961
-TRAF_SAMPLE_95_1498938997_236495
+TRAF_SAMPLE_08256920717490504707_1499123383_331045
+TRAF_SAMPLE_08256920717490506747_1499123452_066783
--- SQL operation complete.
>> -- should be the same as previous "get tables"
@@ -560,7 +560,7 @@ SB_PERSISTENT_SAMPLES
STEST
STESTC
STEST_EMPTY
-TRAF_SAMPLE_95_1498938997_236495
+TRAF_SAMPLE_08256920717490504707_1499123383_331045
--- SQL operation complete.
>> -- should be the same as previous "get tables" except only one sample table
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8dbae2c6/core/sql/ustat/hs_globals.cpp
----------------------------------------------------------------------
diff --git a/core/sql/ustat/hs_globals.cpp b/core/sql/ustat/hs_globals.cpp
index ed565b0..d48d41a 100644
--- a/core/sql/ustat/hs_globals.cpp
+++ b/core/sql/ustat/hs_globals.cpp
@@ -4123,15 +4123,28 @@ void HSSample::makeTableName(NABoolean isPersSample)
else
#endif /* _DEBUG */
{
- char objectIDStr[30];
- char timestampStr[15];
+ char objectIDStr[30]; // room for 64-bit integer (20 digits max)
+ char zeroPaddedObjectIDStr[30];
+ char timestampStr[20]; // room for _<10 digits>_<6 digits>
NA_timeval tv;
NA_gettimeofday(&tv, 0);
+ // When constructing the sample table name, we use a fixed-length
+ // representation to minimize non-determinism in test logs. (We
+ // have found that variable-length representations are subject to
+ // havoc with line-wrapping semantics; it's harder to filter out
+ // non-determinism that wraps across lines.)
+
+ // convert object UID to a fixed-length string (with leading zeroes)
+ // note: object UIDs are always positive today
convertInt64ToAscii(objDef->getObjectUID(), objectIDStr);
- sprintf(timestampStr, "_%u_%u", (UInt32)tv.tv_sec, (UInt32)tv.tv_usec);
+ strcpy(zeroPaddedObjectIDStr,"000000000000000000000000"); // 20 zeroes
+ strcpy(zeroPaddedObjectIDStr+(20-strlen(objectIDStr)),objectIDStr);
+
+ // use fixed length strings for the time stamp parts too
+ sprintf(timestampStr, "_%010u_%06u", (UInt32)tv.tv_sec, (UInt32)tv.tv_usec);
sampleTable += TRAF_SAMPLE_PREFIX; // "TRAF_SAMPLE_"
- sampleTable += objectIDStr;
+ sampleTable += zeroPaddedObjectIDStr;
sampleTable += timestampStr;
// This is FALSE by default; we only set it here defensively in case it
[2/2] incubator-trafodion git commit: Merge [TRAFODION-2662] PR 1162
Make compGeneral/TEST023 less non-deterministic
Posted by db...@apache.org.
Merge [TRAFODION-2662] PR 1162 Make compGeneral/TEST023 less non-deterministic
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/b0392f45
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/b0392f45
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/b0392f45
Branch: refs/heads/master
Commit: b0392f45235c338110c86e4b8c637c68c3866005
Parents: 72bf9b7 8dbae2c
Author: Dave Birdsall <db...@apache.org>
Authored: Tue Jul 4 20:01:14 2017 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Tue Jul 4 20:01:14 2017 +0000
----------------------------------------------------------------------
core/sql/regress/compGeneral/EXPECTED023 | 50 +++++++++++++--------------
core/sql/ustat/hs_globals.cpp | 21 ++++++++---
2 files changed, 42 insertions(+), 29 deletions(-)
----------------------------------------------------------------------