提交 78828d4d 编写于 作者: C Cary Xu

enh: add more check

上级 8573fb56
...@@ -131,15 +131,15 @@ int32_t smaFinishCommit(SSma *pSma) { ...@@ -131,15 +131,15 @@ int32_t smaFinishCommit(SSma *pSma) {
if (!pSmaEnv) { if (!pSmaEnv) {
goto _exit; goto _exit;
} }
if ((code = tsdbFinishCommit(VND_RSMA0(pVnode))) < 0) { if (VND_RSMA0(pVnode) && (code = tsdbFinishCommit(VND_RSMA0(pVnode))) < 0) {
smaError("vgId:%d, failed to finish commit tsdb rsma0 since %s", TD_VID(pVnode), tstrerror(code)); smaError("vgId:%d, failed to finish commit tsdb rsma0 since %s", TD_VID(pVnode), tstrerror(code));
goto _exit; goto _exit;
} }
if ((code = tsdbFinishCommit(VND_RSMA1(pVnode))) < 0) { if (VND_RSMA1(pVnode) && (code = tsdbFinishCommit(VND_RSMA1(pVnode))) < 0) {
smaError("vgId:%d, failed to finish commit tsdb rsma1 since %s", TD_VID(pVnode), tstrerror(code)); smaError("vgId:%d, failed to finish commit tsdb rsma1 since %s", TD_VID(pVnode), tstrerror(code));
goto _exit; goto _exit;
} }
if ((code = tsdbFinishCommit(VND_RSMA2(pVnode))) < 0) { if (VND_RSMA2(pVnode) && (code = tsdbFinishCommit(VND_RSMA2(pVnode))) < 0) {
smaError("vgId:%d, failed to finish commit tsdb rsma2 since %s", TD_VID(pVnode), tstrerror(code)); smaError("vgId:%d, failed to finish commit tsdb rsma2 since %s", TD_VID(pVnode), tstrerror(code));
goto _exit; goto _exit;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册