diff --git a/src/vnode/src/vnodeMain.c b/src/vnode/src/vnodeMain.c index 6e7976ff44..77afb7bf29 100644 --- a/src/vnode/src/vnodeMain.c +++ b/src/vnode/src/vnodeMain.c @@ -265,7 +265,7 @@ void vnodeRelease(void *pVnodeRaw) { int32_t vgId = pVnode->vgId; int32_t refCount = atomic_sub_fetch_32(&pVnode->refCount, 1); - if (ref < 0) { + if (refCount < 0) { vTrace("vgId:%d, other thread is releasing vnode, refCount:%d", vgId, refCount); return; // avoid two threads dec ref count }