未验证 提交 0addf051 编写于 作者: D dapan1121 提交者: GitHub

Merge pull request #19414 from taosdata/fix/TD-19254-D

fix: coverity issue
...@@ -148,10 +148,6 @@ int32_t smaOpen(SVnode *pVnode, int8_t rollback) { ...@@ -148,10 +148,6 @@ int32_t smaOpen(SVnode *pVnode, int8_t rollback) {
SMA_OPEN_RSMA_IMPL(pVnode, 1); SMA_OPEN_RSMA_IMPL(pVnode, 1);
} else if (i == TSDB_RETENTION_L2) { } else if (i == TSDB_RETENTION_L2) {
SMA_OPEN_RSMA_IMPL(pVnode, 2); SMA_OPEN_RSMA_IMPL(pVnode, 2);
} else {
code = TSDB_CODE_APP_ERROR;
smaError("vgId:%d, sma open failed since %s, level:%d", TD_VID(pVnode), tstrerror(code), i);
TSDB_CHECK_CODE(code, lino, _exit);
} }
} }
......
...@@ -237,8 +237,8 @@ int32_t rsmaSnapRead(SRSmaSnapReader* pReader, uint8_t** ppData) { ...@@ -237,8 +237,8 @@ int32_t rsmaSnapRead(SRSmaSnapReader* pReader, uint8_t** ppData) {
_exit: _exit:
if (code) { if (code) {
rsmaSnapReaderClose(&pReader);
smaError("vgId:%d, vnode snapshot rsma read failed since %s", SMA_VID(pReader->pSma), tstrerror(code)); smaError("vgId:%d, vnode snapshot rsma read failed since %s", SMA_VID(pReader->pSma), tstrerror(code));
rsmaSnapReaderClose(&pReader);
} else { } else {
smaInfo("vgId:%d, vnode snapshot rsma read succeed", SMA_VID(pReader->pSma)); smaInfo("vgId:%d, vnode snapshot rsma read succeed", SMA_VID(pReader->pSma));
} }
...@@ -432,7 +432,7 @@ _exit: ...@@ -432,7 +432,7 @@ _exit:
if (pInFD) taosCloseFile(&pInFD); if (pInFD) taosCloseFile(&pInFD);
smaError("vgId:%d, vnode snapshot rsma writer close failed since %s", SMA_VID(pSma), tstrerror(code)); smaError("vgId:%d, vnode snapshot rsma writer close failed since %s", SMA_VID(pSma), tstrerror(code));
} else { } else {
smaInfo("vgId:%d, vnode snapshot rsma writer close succeed", SMA_VID(pSma)); smaInfo("vgId:%d, vnode snapshot rsma writer close succeed", pSma ? SMA_VID(pSma) : 0);
} }
return code; return code;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册