未验证 提交 12bb7b86 编写于 作者: D dapan1121 提交者: GitHub

Merge pull request #20109 from taosdata/fix/TD-22678

fix: rsma invalid read issue
...@@ -279,10 +279,7 @@ static void tdDestroyRSmaStat(void *pRSmaStat) { ...@@ -279,10 +279,7 @@ static void tdDestroyRSmaStat(void *pRSmaStat) {
// step 1: set rsma trigger stat cancelled // step 1: set rsma trigger stat cancelled
atomic_store_8(RSMA_TRIGGER_STAT(pStat), TASK_TRIGGER_STAT_CANCELLED); atomic_store_8(RSMA_TRIGGER_STAT(pStat), TASK_TRIGGER_STAT_CANCELLED);
// step 2: destroy the rsma info and associated fetch tasks // step 2: wait for all triggered fetch tasks to finish
taosHashCleanup(RSMA_INFO_HASH(pStat));
// step 3: wait for all triggered fetch tasks to finish
int32_t nLoops = 0; int32_t nLoops = 0;
while (1) { while (1) {
if (T_REF_VAL_GET((SSmaStat *)pStat) == 0) { if (T_REF_VAL_GET((SSmaStat *)pStat) == 0) {
...@@ -298,9 +295,12 @@ static void tdDestroyRSmaStat(void *pRSmaStat) { ...@@ -298,9 +295,12 @@ static void tdDestroyRSmaStat(void *pRSmaStat) {
} }
} }
// step 4: // step 3:
tdRsmaStopExecutor(pSma); tdRsmaStopExecutor(pSma);
// step 4: destroy the rsma info and associated fetch tasks
taosHashCleanup(RSMA_INFO_HASH(pStat));
// step 5: // step 5:
tdRSmaFSClose(RSMA_FS(pStat)); tdRSmaFSClose(RSMA_FS(pStat));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册