Merge pull request #29099 from taosdata/fix/main/TD-33179
Enh(mnode):Add sdbCancelFetch and sdbRelease while exit iter.
This commit is contained in:
commit
925a222366
|
@ -920,7 +920,9 @@ static int32_t mndRetrieveMnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
||||||
SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||||
code = colDataSetVal(pColInfo, numOfRows, (const char *)&pObj->id, false);
|
code = colDataSetVal(pColInfo, numOfRows, (const char *)&pObj->id, false);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
mError("mnode:%d, failed to set col data val since %s", pObj->id, terrstr());
|
mError("mnode:%d, failed to set col data val since %s", pObj->id, tstrerror(code));
|
||||||
|
sdbCancelFetch(pSdb, pShow->pIter);
|
||||||
|
sdbRelease(pSdb, pObj);
|
||||||
goto _out;
|
goto _out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -930,7 +932,9 @@ static int32_t mndRetrieveMnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
||||||
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||||
code = colDataSetVal(pColInfo, numOfRows, b1, false);
|
code = colDataSetVal(pColInfo, numOfRows, b1, false);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
mError("mnode:%d, failed to set col data val since %s", pObj->id, terrstr());
|
mError("mnode:%d, failed to set col data val since %s", pObj->id, tstrerror(code));
|
||||||
|
sdbCancelFetch(pSdb, pShow->pIter);
|
||||||
|
sdbRelease(pSdb, pObj);
|
||||||
goto _out;
|
goto _out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -951,7 +955,9 @@ static int32_t mndRetrieveMnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
||||||
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||||
code = colDataSetVal(pColInfo, numOfRows, (const char *)b2, false);
|
code = colDataSetVal(pColInfo, numOfRows, (const char *)b2, false);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
mError("mnode:%d, failed to set col data val since %s", pObj->id, terrstr());
|
mError("mnode:%d, failed to set col data val since %s", pObj->id, tstrerror(code));
|
||||||
|
sdbCancelFetch(pSdb, pShow->pIter);
|
||||||
|
sdbRelease(pSdb, pObj);
|
||||||
goto _out;
|
goto _out;
|
||||||
}
|
}
|
||||||
const char *status = "ready";
|
const char *status = "ready";
|
||||||
|
@ -963,14 +969,18 @@ static int32_t mndRetrieveMnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
||||||
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||||
code = colDataSetVal(pColInfo, numOfRows, (const char *)b3, false);
|
code = colDataSetVal(pColInfo, numOfRows, (const char *)b3, false);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
mError("mnode:%d, failed to set col data val since %s", pObj->id, terrstr());
|
mError("mnode:%d, failed to set col data val since %s", pObj->id, tstrerror(code));
|
||||||
|
sdbCancelFetch(pSdb, pShow->pIter);
|
||||||
|
sdbRelease(pSdb, pObj);
|
||||||
goto _out;
|
goto _out;
|
||||||
}
|
}
|
||||||
|
|
||||||
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||||
code = colDataSetVal(pColInfo, numOfRows, (const char *)&pObj->createdTime, false);
|
code = colDataSetVal(pColInfo, numOfRows, (const char *)&pObj->createdTime, false);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
mError("mnode:%d, failed to set col data val since %s", pObj->id, terrstr());
|
mError("mnode:%d, failed to set col data val since %s", pObj->id, tstrerror(code));
|
||||||
|
sdbCancelFetch(pSdb, pShow->pIter);
|
||||||
|
sdbRelease(pSdb, pObj);
|
||||||
goto _out;
|
goto _out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -978,7 +988,9 @@ static int32_t mndRetrieveMnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
||||||
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||||
code = colDataSetVal(pColInfo, numOfRows, (const char *)&roleTimeMs, false);
|
code = colDataSetVal(pColInfo, numOfRows, (const char *)&roleTimeMs, false);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
mError("mnode:%d, failed to set col data val since %s", pObj->id, terrstr());
|
mError("mnode:%d, failed to set col data val since %s", pObj->id, tstrerror(code));
|
||||||
|
sdbCancelFetch(pSdb, pShow->pIter);
|
||||||
|
sdbRelease(pSdb, pObj);
|
||||||
goto _out;
|
goto _out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue