Merge pull request #8420 from taosdata/feature/dnode3

Feature/dnode3
This commit is contained in:
Shengliang Guan 2021-10-25 18:04:02 +08:00 committed by GitHub
commit 009270aa14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 26 deletions

View File

@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TDENGINE_RAFT_SYNC_H
#define TDENGINE_RAFT_SYNC_H
#ifndef _TD_LIBS_SYNC_H
#define _TD_LIBS_SYNC_H
#ifdef __cplusplus
extern "C" {
@ -27,7 +27,7 @@ extern "C" {
typedef uint32_t SyncNodeId;
typedef int32_t SyncGroupId;
typedef int64_t SyncIndex;
typedef uint64_t SSyncTerm;
typedef uint64_t SyncTerm;
typedef enum {
TAOS_SYNC_ROLE_FOLLOWER = 0,
@ -59,7 +59,6 @@ typedef struct {
ESyncRole* role;
} SNodesRole;
struct SSyncFSM;
typedef struct SSyncFSM {
void* pData;
@ -87,7 +86,7 @@ typedef struct SSyncFSM {
typedef struct SSyncServerState {
SyncNodeId voteFor;
SSyncTerm term;
SyncTerm term;
} SSyncServerState;
typedef struct SStateManager {
@ -123,10 +122,10 @@ void syncStop(SyncNodeId);
int32_t syncPropose(SyncNodeId nodeId, SSyncBuffer buffer, void* pData, bool isWeak);
extern int32_t raftDebugFlag;
extern int32_t syncDebugFlag;
#ifdef __cplusplus
}
#endif
#endif // TDENGINE_RAFT_SYNC_H
#endif /*_TD_LIBS_SYNC_H*/