diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 935d89b99b336b5438892be7d5726c9c04bb4ee8..ceca20150603d9079187b7ece312aa14f4b31f2a 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -2501,19 +2501,15 @@ int32_t syncNodeOnClientRequestCb(SSyncNode* ths, SyncClientRequest* pMsg, SyncI // if mulit replica, start replicate right now if (ths->replicaNum > 1) { syncNodeReplicate(ths); - } - // pre commit - syncNodePreCommit(ths, pEntry, 0); + // pre commit + syncNodePreCommit(ths, pEntry, 0); + } // if only myself, maybe commit right now if (ths->replicaNum == 1) { syncMaybeAdvanceCommitIndex(ths); } - - } else { - // pre commit - syncNodePreCommit(ths, pEntry, 0); } if (pRetIndex != NULL) {