From e3a3c1386be8d5f766ee9e9ecd7ebb326b0b8753 Mon Sep 17 00:00:00 2001 From: Minghao Li Date: Tue, 22 Mar 2022 17:53:43 +0800 Subject: [PATCH] sync refactor --- include/libs/sync/sync.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/libs/sync/sync.h b/include/libs/sync/sync.h index 7802aaca96..b2ed9ea3c4 100644 --- a/include/libs/sync/sync.h +++ b/include/libs/sync/sync.h @@ -161,13 +161,15 @@ void syncCleanUp(); int64_t syncStart(const SSyncInfo* pSyncInfo); void syncStop(int64_t rid); int32_t syncReconfig(int64_t rid, const SSyncCfg* pSyncCfg); -int32_t syncPropose(int64_t rid, const SRpcMsg* pMsg, bool isWeak); // use this function -int32_t syncForwardToPeer(int64_t rid, const SRpcMsg* pMsg, bool isWeak); // for compatibility, the same as syncPropose +int32_t syncPropose(int64_t rid, const SRpcMsg* pMsg, bool isWeak); ESyncState syncGetMyRole(int64_t rid); // propose with sequence number, to implement linearizable semantics int32_t syncPropose2(int64_t rid, const SRpcMsg* pMsg, bool isWeak, uint64_t seqNum); +// for compatibility, the same as syncPropose +int32_t syncForwardToPeer(int64_t rid, const SRpcMsg* pMsg, bool isWeak); + extern int32_t sDebugFlag; #ifdef __cplusplus