提交 21629cc7 编写于 作者: C Cary Xu

fix: adjust the destroy order of rsma stat

上级 26b9a07e
......@@ -278,7 +278,6 @@ static void tdDestroyRSmaStat(void *pRSmaStat) {
smaDebug("vgId:%d, destroy rsma stat %p", SMA_VID(pSma), pRSmaStat);
// step 1: set rsma trigger stat cancelled
atomic_store_8(RSMA_TRIGGER_STAT(pStat), TASK_TRIGGER_STAT_CANCELLED);
tsem_destroy(&(pStat->notEmpty));
// step 2: destroy the rsma info and associated fetch tasks
taosHashCleanup(RSMA_INFO_HASH(pStat));
......@@ -306,6 +305,7 @@ static void tdDestroyRSmaStat(void *pRSmaStat) {
tdRSmaFSClose(RSMA_FS(pStat));
// step 6: free pStat
tsem_destroy(&(pStat->notEmpty));
taosMemoryFreeClear(pStat);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册