diff --git a/include/common/tmsg.h b/include/common/tmsg.h index dbca38526a7849bd96462a0c6d517a91c27a5000..c58cc3c7c5afcd5cfafb265e8bcf2ac6e3ae7452 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -892,6 +892,7 @@ typedef struct { int32_t numOfVgroups; int32_t numOfStables; int32_t buffer; + int32_t cacheSize; int32_t pageSize; int32_t pages; int32_t daysPerFile; diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 81cdd0e5e065f694d4c31a6e38f8fa620d7f0ce9..4fd1187fef531fcae086e8eeacd6968dd25ca6ac 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -2765,6 +2765,7 @@ int32_t tSerializeSDbCfgRsp(void *buf, int32_t bufLen, const SDbCfgRsp *pRsp) { if (tEncodeI32(&encoder, pRsp->numOfVgroups) < 0) return -1; if (tEncodeI32(&encoder, pRsp->numOfStables) < 0) return -1; if (tEncodeI32(&encoder, pRsp->buffer) < 0) return -1; + if (tEncodeI32(&encoder, pRsp->cacheSize) < 0) return -1; if (tEncodeI32(&encoder, pRsp->pageSize) < 0) return -1; if (tEncodeI32(&encoder, pRsp->pages) < 0) return -1; if (tEncodeI32(&encoder, pRsp->daysPerFile) < 0) return -1; @@ -2804,6 +2805,7 @@ int32_t tDeserializeSDbCfgRsp(void *buf, int32_t bufLen, SDbCfgRsp *pRsp) { if (tDecodeI32(&decoder, &pRsp->numOfVgroups) < 0) return -1; if (tDecodeI32(&decoder, &pRsp->numOfStables) < 0) return -1; if (tDecodeI32(&decoder, &pRsp->buffer) < 0) return -1; + if (tDecodeI32(&decoder, &pRsp->cacheSize) < 0) return -1; if (tDecodeI32(&decoder, &pRsp->pageSize) < 0) return -1; if (tDecodeI32(&decoder, &pRsp->pages) < 0) return -1; if (tDecodeI32(&decoder, &pRsp->daysPerFile) < 0) return -1; diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index 13990f4ba733317d1d644693b948b8e04af0b834..1fa886b722bacfc4ac15b0ed2700769b55c6d3e3 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -848,6 +848,7 @@ static int32_t mndProcessGetDbCfgReq(SRpcMsg *pReq) { cfgRsp.numOfVgroups = pDb->cfg.numOfVgroups; cfgRsp.numOfStables = pDb->cfg.numOfStables; cfgRsp.buffer = pDb->cfg.buffer; + cfgRsp.cacheSize = pDb->cfg.cacheLastSize; cfgRsp.pageSize = pDb->cfg.pageSize; cfgRsp.pages = pDb->cfg.pages; cfgRsp.daysPerFile = pDb->cfg.daysPerFile; diff --git a/source/libs/command/src/command.c b/source/libs/command/src/command.c index 5ac5e0596f953626759a330a1688602ff6eb77e0..47a904bba210ef157b048515e4b0cb0528ae9f32 100644 --- a/source/libs/command/src/command.c +++ b/source/libs/command/src/command.c @@ -268,10 +268,10 @@ static void setCreateDBResultIntoDataBlock(SSDataBlock* pBlock, char* dbFName, S len += sprintf( buf2 + VARSTR_HEADER_SIZE, - "CREATE DATABASE `%s` BUFFER %d CACHEMODEL '%s' COMP %d DURATION %dm " + "CREATE DATABASE `%s` BUFFER %d CACHESIZE %d CACHEMODEL '%s' COMP %d DURATION %dm " "WAL_FSYNC_PERIOD %d MAXROWS %d MINROWS %d KEEP %dm,%dm,%dm PAGES %d PAGESIZE %d PRECISION '%s' REPLICA %d " "STRICT '%s' WAL_LEVEL %d VGROUPS %d SINGLE_STABLE %d", - dbFName, pCfg->buffer, cacheModelStr(pCfg->cacheLast), pCfg->compression, pCfg->daysPerFile, pCfg->walFsyncPeriod, + dbFName, pCfg->buffer, pCfg->cacheSize, cacheModelStr(pCfg->cacheLast), pCfg->compression, pCfg->daysPerFile, pCfg->walFsyncPeriod, pCfg->maxRows, pCfg->minRows, pCfg->daysToKeep0, pCfg->daysToKeep1, pCfg->daysToKeep2, pCfg->pages, pCfg->pageSize, prec, pCfg->replications, strictStr(pCfg->strict), pCfg->walLevel, pCfg->numOfVgroups, 1 == pCfg->numOfStables); diff --git a/source/libs/qcom/src/querymsg.c b/source/libs/qcom/src/querymsg.c index fadd07a9f3221d5dce2e62f96967106b10fa1d7c..953abd595695a3616e3cf89fa89994f3306283d0 100644 --- a/source/libs/qcom/src/querymsg.c +++ b/source/libs/qcom/src/querymsg.c @@ -529,7 +529,7 @@ int32_t queryProcessGetDbCfgRsp(void *output, char *msg, int32_t msgSize) { } if (tDeserializeSDbCfgRsp(msg, msgSize, &out) != 0) { - qError("tDeserializeSDbCfgRsp failed, msgSize:%d", msgSize); + qError("tDeserializeSDbCfgRsp failed, msgSize:%d,dbCfgRsp:%lu", msgSize, sizeof(out)); return TSDB_CODE_INVALID_MSG; } diff --git a/tests/system-test/0-others/compatibility.py b/tests/system-test/0-others/compatibility.py index 25b023bb76e9e9f34f288624a5f33daeca78d717..e81579a9e4ca3f2f72b9aff3892f1ed2878855a1 100644 --- a/tests/system-test/0-others/compatibility.py +++ b/tests/system-test/0-others/compatibility.py @@ -81,6 +81,7 @@ class TDTestCase: dbname = "test" stb = f"{dbname}.meters" self.installTaosd(bPath,cPath) + os.system("echo 'debugFlag 143' > /etc/taos/taos.cfg ") tableNumbers=100 recordNumbers1=100 recordNumbers2=1000 @@ -96,8 +97,8 @@ class TDTestCase: tdLog.info(f"Base client version is {oldClientVersion}") tdLog.printNoPrefix(f"==========step1:prepare and check data in old version-{oldServerVersion}") - tdLog.info(f"taosBenchmark -t {tableNumbers} -n {recordNumbers1} -y ") - os.system(f"taosBenchmark -t {tableNumbers} -n {recordNumbers1} -y ") + tdLog.info(f" LD_LIBRARY_PATH=/usr/lib taosBenchmark -t {tableNumbers} -n {recordNumbers1} -y ") + os.system(f"LD_LIBRARY_PATH=/usr/lib taosBenchmark -t {tableNumbers} -n {recordNumbers1} -y ") sleep(3) # tdsqlF.query(f"select count(*) from {stb}") diff --git a/tests/system-test/fulltest.sh b/tests/system-test/fulltest.sh old mode 100755 new mode 100644 index 3d6c2ecb94d354ed15260f5c7c8ea96242007cde..a89b41cac62dee556118e9344cdbab66689c8971 --- a/tests/system-test/fulltest.sh +++ b/tests/system-test/fulltest.sh @@ -610,4 +610,3 @@ python3 ./test.py -f 2-query/last_row.py -Q 4 python3 ./test.py -f 2-query/tsbsQuery.py -Q 4 #python3 ./test.py -f 2-query/sml.py -Q 4 python3 ./test.py -f 2-query/interp.py -Q 4 -