diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 369847b672b9c1b768f5feb0e125db904f993a24..a6e0cb7659e48c7783b38ef1bceba54ac74195cb 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -944,6 +944,7 @@ SSyncNode* syncNodeOpen(SSyncInfo* pSyncInfo) { SSyncSnapshotSender* pSender = snapshotSenderCreate(pSyncNode, i); // ASSERT(pSender != NULL); (pSyncNode->senders)[i] = pSender; + sSTrace(pSender, "snapshot sender create new while open, data:%p", pSender); } // snapshot receivers @@ -971,7 +972,7 @@ SSyncNode* syncNodeOpen(SSyncInfo* pSyncInfo) { atomic_store_64(&pSyncNode->snapshottingIndex, SYNC_INDEX_INVALID); pSyncNode->isStart = true; - sNTrace(pSyncNode, "sync open"); + sNTrace(pSyncNode, "sync open, node:%p", pSyncNode); return pSyncNode; @@ -1041,14 +1042,10 @@ void syncNodePreClose(SSyncNode* pSyncNode) { void syncHbTimerDataFree(SSyncHbTimerData* pData) { taosMemoryFree(pData); } void syncNodeClose(SSyncNode* pSyncNode) { - if (pSyncNode == NULL) { - return; - } - int32_t ret; - - sNTrace(pSyncNode, "sync close"); + if (pSyncNode == NULL) return; + sNTrace(pSyncNode, "sync close, data:%p", pSyncNode); - ret = raftStoreClose(pSyncNode->pRaftStore); + int32_t ret = raftStoreClose(pSyncNode->pRaftStore); ASSERT(ret == 0); pSyncNode->pRaftStore = NULL; @@ -1077,6 +1074,7 @@ void syncNodeClose(SSyncNode* pSyncNode) { for (int32_t i = 0; i < TSDB_MAX_REPLICA; ++i) { if ((pSyncNode->senders)[i] != NULL) { + sSTrace((pSyncNode->senders)[i], "snapshot sender destroy while close, data:%p", (pSyncNode->senders)[i]); snapshotSenderDestroy((pSyncNode->senders)[i]); (pSyncNode->senders)[i] = NULL; } @@ -1423,15 +1421,17 @@ void syncNodeDoConfigChange(SSyncNode* pSyncNode, SSyncCfg* pNewConfig, SyncInde for (int32_t i = 0; i < TSDB_MAX_REPLICA; ++i) { if ((pSyncNode->senders)[i] == NULL) { (pSyncNode->senders)[i] = snapshotSenderCreate(pSyncNode, i); - sSTrace((pSyncNode->senders)[i], "snapshot sender create new"); + sSTrace((pSyncNode->senders)[i], "snapshot sender create new while reconfig, data:%p", (pSyncNode->senders)[i]); + } else { + sSTrace((pSyncNode->senders)[i], "snapshot sender already exist, data:%p", (pSyncNode->senders)[i]); } } // free old for (int32_t i = 0; i < TSDB_MAX_REPLICA; ++i) { if (oldSenders[i] != NULL) { + sNTrace(pSyncNode, "snapshot sender destroy old, data:%p replica-index:%d", oldSenders[i], i); snapshotSenderDestroy(oldSenders[i]); - sNTrace(pSyncNode, "snapshot sender delete old %p replica-index:%d", oldSenders[i], i); oldSenders[i] = NULL; } } diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 2aac64d045af5d728d1190377c1372887e573f66..89e7e9f7969fc5b9fd45f46cefc1349ebc31c5c6 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -213,7 +213,7 @@ ,,n,script,./test.sh -f tsim/stream/basic0.sim -g ,,y,script,./test.sh -f tsim/stream/basic1.sim ,,y,script,./test.sh -f tsim/stream/basic2.sim -,,,script,./test.sh -f tsim/stream/drop_stream.sim +,,y,script,./test.sh -f tsim/stream/drop_stream.sim ,,y,script,./test.sh -f tsim/stream/fillHistoryBasic1.sim ,,y,script,./test.sh -f tsim/stream/fillHistoryBasic2.sim ,,y,script,./test.sh -f tsim/stream/fillHistoryBasic3.sim @@ -228,7 +228,7 @@ ,,y,script,./test.sh -f tsim/stream/partitionby.sim ,,y,script,./test.sh -f tsim/stream/partitionby1.sim ,,y,script,./test.sh -f tsim/stream/schedSnode.sim -,,,script,./test.sh -f tsim/stream/windowClose.sim +,,y,script,./test.sh -f tsim/stream/windowClose.sim ,,y,script,./test.sh -f tsim/stream/ignoreExpiredData.sim ,,y,script,./test.sh -f tsim/stream/sliding.sim ,,y,script,./test.sh -f tsim/stream/partitionbyColumnInterval.sim @@ -279,7 +279,7 @@ ,,y,script,./test.sh -f tsim/stable/vnode3.sim ,,y,script,./test.sh -f tsim/stable/metrics_idx.sim ,,,script,./test.sh -f tsim/sma/drop_sma.sim -,,,script,./test.sh -f tsim/sma/tsmaCreateInsertQuery.sim +,,y,script,./test.sh -f tsim/sma/tsmaCreateInsertQuery.sim ,,y,script,./test.sh -f tsim/sma/rsmaCreateInsertQuery.sim ,,y,script,./test.sh -f tsim/sma/rsmaPersistenceRecovery.sim ,,n,script,./test.sh -f tsim/valgrind/checkError1.sim diff --git a/tests/script/tsim/mnode/basic5.sim b/tests/script/tsim/mnode/basic5.sim index 5bb1f4123046a909cb6cd7c15ea2a92f58c1fa24..f0f0f18576e3665dce0ff4f7f393dde5ed24b05e 100644 --- a/tests/script/tsim/mnode/basic5.sim +++ b/tests/script/tsim/mnode/basic5.sim @@ -96,7 +96,7 @@ sql_error drop mnode on dnode 4 sql_error drop mnode on dnode 5 sql_error drop mnode on dnode 6 -system sh/exec.sh -n dnode2 -s stop -x SIGKILL +system sh/exec.sh -n dnode2 -s stop $x = 0 step5: $x = $x + 1 @@ -151,7 +151,7 @@ if $data(4)[4] != ready then endi print =============== step6: stop mnode1 -system sh/exec.sh -n dnode1 -s stop -x SIGKILL +system sh/exec.sh -n dnode1 -s stop # sql_error drop mnode on dnode 1 $x = 0 @@ -205,7 +205,7 @@ if $data(4)[4] != ready then endi print =============== step8: stop mnode1 and drop it -system sh/exec.sh -n dnode1 -s stop -x SIGKILL +system sh/exec.sh -n dnode1 -s stop $x = 0 step81: