From 03b698d8aee80b5a52fea83d9bc4cbf53f7a307e Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 29 Nov 2023 14:50:07 +0800 Subject: [PATCH] change default config --- source/common/src/tglobal.c | 2 +- source/libs/stream/src/streamSnapshot.c | 6 +++++- tests/system-test/8-stream/snode_restart_with_checkpoint.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index f4d79d6e70..9069f5ce99 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -1477,7 +1477,7 @@ static int32_t taosCfgDynamicOptionsForServer(SConfig *pCfg, char *name) { {"supportVnodes", &tsNumOfSupportVnodes}, }; - if (taosCfgSetOption(debugOptions, tListLen(debugOptions), pItem, true) != 0) { + if (taosCfgSetOption(debugOptions, tListLen(debugOptions), pItem, true) != 0) { taosCfgSetOption(options, tListLen(options), pItem, false); } } diff --git a/source/libs/stream/src/streamSnapshot.c b/source/libs/stream/src/streamSnapshot.c index f76b49f300..e29f2ba7de 100644 --- a/source/libs/stream/src/streamSnapshot.c +++ b/source/libs/stream/src/streamSnapshot.c @@ -366,8 +366,12 @@ int32_t streamSnapRead(SStreamSnapReader* pReader, uint8_t** ppData, int64_t* si int32_t code = 0; SStreamSnapHandle* pHandle = &pReader->handle; int32_t idx = pHandle->currIdx; + SBackendSnapFile2* pSnapFile = taosArrayGet(pHandle->pDbSnapSet, idx); - SBackendFileItem* item = NULL; + if (pSnapFile == NULL) { + return 0; + } + SBackendFileItem* item = NULL; _NEXT: diff --git a/tests/system-test/8-stream/snode_restart_with_checkpoint.py b/tests/system-test/8-stream/snode_restart_with_checkpoint.py index 9567bbe439..d7bfd7b407 100644 --- a/tests/system-test/8-stream/snode_restart_with_checkpoint.py +++ b/tests/system-test/8-stream/snode_restart_with_checkpoint.py @@ -31,7 +31,7 @@ class TDTestCase: tdSql.query("use test") tdSql.query("create snode on dnode 4") tdSql.query("create stream if not exists s1 trigger at_once ignore expired 0 ignore update 0 fill_history 1 into st1 as select _wstart,sum(voltage),groupid from meters partition by groupid interval(2s)") - tdLog.debug("========create stream useing snode and insert data ok========") + tdLog.debug("========create stream using snode and insert data ok========") time.sleep(60) tdDnodes = cluster.dnodes