From f755ed40a18730911680ed164e729e7ccb00e55b Mon Sep 17 00:00:00 2001 From: Hui Li Date: Wed, 20 May 2020 17:54:21 +0800 Subject: [PATCH 1/2] [TD-375] --- src/util/src/tutil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/src/tutil.c b/src/util/src/tutil.c index 52f70bdf5e..989273e051 100644 --- a/src/util/src/tutil.c +++ b/src/util/src/tutil.c @@ -416,12 +416,12 @@ void getTmpfilePath(const char *fileNamePrefix, char *dstPath) { #else char *tmpDir = "/tmp/"; #endif - + int64_t ts = taosGetTimestampUs(); strcpy(tmpPath, tmpDir); strcat(tmpPath, tdengineTmpFileNamePrefix); strcat(tmpPath, fileNamePrefix); - strcat(tmpPath, "-%llu-%u"); - snprintf(dstPath, PATH_MAX, tmpPath, taosGetPthreadId(), atomic_add_fetch_32(&tmpFileSerialNum, 1)); + strcat(tmpPath, "-%d-%"PRIu64"-%u-%"PRIu64); + snprintf(dstPath, PATH_MAX, tmpPath, getpid(), taosGetPthreadId(), atomic_add_fetch_32(&tmpFileSerialNum, 1), ts); } int tasoUcs4Compare(void* f1_ucs4, void *f2_ucs4, int bytes) { From ad89a82545ead591e141a4bc555350546d282d38 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Wed, 20 May 2020 17:58:19 +0800 Subject: [PATCH 2/2] change max cache value from 512 to 128. --- tests/pytest/import_merge/importBlock1H.py | 2 +- tests/pytest/import_merge/importBlock1HO.py | 2 +- tests/pytest/import_merge/importBlock1HPO.py | 2 +- tests/pytest/import_merge/importBlock1S.py | 2 +- tests/pytest/import_merge/importBlock1Sub.py | 2 +- tests/pytest/import_merge/importBlock1T.py | 2 +- tests/pytest/import_merge/importBlock1TO.py | 2 +- tests/pytest/import_merge/importBlock1TPO.py | 2 +- tests/pytest/import_merge/importBlock2H.py | 2 +- tests/pytest/import_merge/importBlock2HO.py | 2 +- tests/pytest/import_merge/importBlock2HPO.py | 2 +- tests/pytest/import_merge/importBlock2S.py | 2 +- tests/pytest/import_merge/importBlock2Sub.py | 2 +- tests/pytest/import_merge/importBlock2T.py | 2 +- tests/pytest/import_merge/importBlock2TO.py | 2 +- tests/pytest/import_merge/importBlock2TPO.py | 2 +- tests/pytest/import_merge/importBlockbetween.py | 2 +- tests/pytest/import_merge/importToCommit.py | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/pytest/import_merge/importBlock1H.py b/tests/pytest/import_merge/importBlock1H.py index a1ba905b17..aef29444d6 100644 --- a/tests/pytest/import_merge/importBlock1H.py +++ b/tests/pytest/import_merge/importBlock1H.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlock1HO.py b/tests/pytest/import_merge/importBlock1HO.py index 73aec07a90..ad4bcf1288 100644 --- a/tests/pytest/import_merge/importBlock1HO.py +++ b/tests/pytest/import_merge/importBlock1HO.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlock1HPO.py b/tests/pytest/import_merge/importBlock1HPO.py index ad224e5c65..6aabc035ec 100644 --- a/tests/pytest/import_merge/importBlock1HPO.py +++ b/tests/pytest/import_merge/importBlock1HPO.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlock1S.py b/tests/pytest/import_merge/importBlock1S.py index 37c2ad6631..4b2adfb961 100644 --- a/tests/pytest/import_merge/importBlock1S.py +++ b/tests/pytest/import_merge/importBlock1S.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlock1Sub.py b/tests/pytest/import_merge/importBlock1Sub.py index 5228563651..343b87c757 100644 --- a/tests/pytest/import_merge/importBlock1Sub.py +++ b/tests/pytest/import_merge/importBlock1Sub.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlock1T.py b/tests/pytest/import_merge/importBlock1T.py index 75f41b98cf..40f4bbfdec 100644 --- a/tests/pytest/import_merge/importBlock1T.py +++ b/tests/pytest/import_merge/importBlock1T.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlock1TO.py b/tests/pytest/import_merge/importBlock1TO.py index b43428da27..db8b036d6f 100644 --- a/tests/pytest/import_merge/importBlock1TO.py +++ b/tests/pytest/import_merge/importBlock1TO.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlock1TPO.py b/tests/pytest/import_merge/importBlock1TPO.py index 913ca1cc02..f2361712e7 100644 --- a/tests/pytest/import_merge/importBlock1TPO.py +++ b/tests/pytest/import_merge/importBlock1TPO.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlock2H.py b/tests/pytest/import_merge/importBlock2H.py index bacd88cbe7..62552980bd 100644 --- a/tests/pytest/import_merge/importBlock2H.py +++ b/tests/pytest/import_merge/importBlock2H.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlock2HO.py b/tests/pytest/import_merge/importBlock2HO.py index 01c0f622b6..0f53210f4a 100644 --- a/tests/pytest/import_merge/importBlock2HO.py +++ b/tests/pytest/import_merge/importBlock2HO.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlock2HPO.py b/tests/pytest/import_merge/importBlock2HPO.py index ee8d580dfe..3b7ffbbe44 100644 --- a/tests/pytest/import_merge/importBlock2HPO.py +++ b/tests/pytest/import_merge/importBlock2HPO.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlock2S.py b/tests/pytest/import_merge/importBlock2S.py index d85074bfeb..69b0291839 100644 --- a/tests/pytest/import_merge/importBlock2S.py +++ b/tests/pytest/import_merge/importBlock2S.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlock2Sub.py b/tests/pytest/import_merge/importBlock2Sub.py index deb1dc8337..5b93750584 100644 --- a/tests/pytest/import_merge/importBlock2Sub.py +++ b/tests/pytest/import_merge/importBlock2Sub.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlock2T.py b/tests/pytest/import_merge/importBlock2T.py index ded698d28c..0d9b70299d 100644 --- a/tests/pytest/import_merge/importBlock2T.py +++ b/tests/pytest/import_merge/importBlock2T.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlock2TO.py b/tests/pytest/import_merge/importBlock2TO.py index ffc88c2c99..fe57308c42 100644 --- a/tests/pytest/import_merge/importBlock2TO.py +++ b/tests/pytest/import_merge/importBlock2TO.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlock2TPO.py b/tests/pytest/import_merge/importBlock2TPO.py index 8b6c70c32b..4da52bd3f4 100644 --- a/tests/pytest/import_merge/importBlock2TPO.py +++ b/tests/pytest/import_merge/importBlock2TPO.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importBlockbetween.py b/tests/pytest/import_merge/importBlockbetween.py index c3482b3776..eea7f7ea7c 100644 --- a/tests/pytest/import_merge/importBlockbetween.py +++ b/tests/pytest/import_merge/importBlockbetween.py @@ -34,7 +34,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512') + tdSql.execute('create database db cache 128') tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importToCommit.py b/tests/pytest/import_merge/importToCommit.py index 3684dde049..b1a0065d47 100644 --- a/tests/pytest/import_merge/importToCommit.py +++ b/tests/pytest/import_merge/importToCommit.py @@ -33,7 +33,7 @@ class TDTestCase: tdDnodes.start(1) tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db cache 512 maxtables 10') + tdSql.execute('create database db cache 128 maxtables 10') tdSql.execute('use db') tdLog.info("================= step1")