fix: adjust the destroy order of rsma stat
This commit is contained in:
parent
26b9a07e7f
commit
21629cc707
|
@ -278,7 +278,6 @@ static void tdDestroyRSmaStat(void *pRSmaStat) {
|
||||||
smaDebug("vgId:%d, destroy rsma stat %p", SMA_VID(pSma), pRSmaStat);
|
smaDebug("vgId:%d, destroy rsma stat %p", SMA_VID(pSma), 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);
|
||||||
tsem_destroy(&(pStat->notEmpty));
|
|
||||||
|
|
||||||
// step 2: destroy the rsma info and associated fetch tasks
|
// step 2: destroy the rsma info and associated fetch tasks
|
||||||
taosHashCleanup(RSMA_INFO_HASH(pStat));
|
taosHashCleanup(RSMA_INFO_HASH(pStat));
|
||||||
|
@ -306,6 +305,7 @@ static void tdDestroyRSmaStat(void *pRSmaStat) {
|
||||||
tdRSmaFSClose(RSMA_FS(pStat));
|
tdRSmaFSClose(RSMA_FS(pStat));
|
||||||
|
|
||||||
// step 6: free pStat
|
// step 6: free pStat
|
||||||
|
tsem_destroy(&(pStat->notEmpty));
|
||||||
taosMemoryFreeClear(pStat);
|
taosMemoryFreeClear(pStat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue