From 19bc76109b1f0e26fb8ed4e734e10a4c407e9a45 Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Sat, 23 May 2020 14:47:49 +0000 Subject: [PATCH] compliing opton for sync --- src/vnode/src/vnodeMain.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vnode/src/vnodeMain.c b/src/vnode/src/vnodeMain.c index 5d41fa6bc4..d548c0fc98 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