diff --git a/src/vnode/src/vnodeMain.c b/src/vnode/src/vnodeMain.c index 5d41fa6bc40008ec09616dafaf9ca038c6866bdc..d548c0fc98552ab4cec4eec20bfc13943cf48093 100644 --- a/src/vnode/src/vnodeMain.c +++ b/src/vnode/src/vnodeMain.c @@ -249,13 +249,14 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) { syncInfo.notifyRole = vnodeNotifyRole; syncInfo.notifyFileSynced = vnodeNotifyFileSynced; pVnode->sync = syncStart(&syncInfo); + +#ifndef _SYNC + pVnode->role = TAOS_SYNC_ROLE_MASTER; +#elif if (pVnode->sync == NULL) { vnodeCleanUp(pVnode); return terrno; } - -#ifndef _SYNC - pVnode->role = TAOS_SYNC_ROLE_MASTER; #endif // start continuous query