From 78828d4d47ea3603ff8e972877b59befb54e8c64 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Wed, 19 Oct 2022 17:58:39 +0800 Subject: [PATCH] enh: add more check --- source/dnode/vnode/src/sma/smaCommit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/dnode/vnode/src/sma/smaCommit.c b/source/dnode/vnode/src/sma/smaCommit.c index 08b326c659..8849bcc047 100644 --- a/source/dnode/vnode/src/sma/smaCommit.c +++ b/source/dnode/vnode/src/sma/smaCommit.c @@ -131,15 +131,15 @@ int32_t smaFinishCommit(SSma *pSma) { if (!pSmaEnv) { 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)); 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)); 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)); goto _exit; } -- GitLab