enh(sync): add FpSnapshotRead FpSnapshotApply
This commit is contained in:
parent
07fee01d1c
commit
aa1de8b34a
|
@ -90,6 +90,10 @@ typedef struct SSyncFSM {
|
|||
void (*FpRestoreFinish)(struct SSyncFSM* pFsm);
|
||||
int32_t (*FpGetSnapshot)(struct SSyncFSM* pFsm, SSnapshot* pSnapshot);
|
||||
int32_t (*FpRestoreSnapshot)(struct SSyncFSM* pFsm, const SSnapshot* snapshot);
|
||||
|
||||
void* (*FpSnapshotRead)(struct SSyncFSM* pFsm, const SSnapshot* snapshot, void* iter, char** ppBuf, int32_t* len);
|
||||
int32_t (*FpSnapshotApply)(struct SSyncFSM* pFsm, const SSnapshot* snapshot, char* pBuf, int32_t len);
|
||||
|
||||
} SSyncFSM;
|
||||
|
||||
// abstract definition of log store in raft
|
||||
|
|
|
@ -73,9 +73,7 @@ int32_t GetSnapshotCb(struct SSyncFSM* pFsm, SSnapshot* pSnapshot) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void FpRestoreFinishCb(struct SSyncFSM* pFsm) {
|
||||
sTrace("==callback== ==FpRestoreFinishCb==");
|
||||
}
|
||||
void FpRestoreFinishCb(struct SSyncFSM* pFsm) { sTrace("==callback== ==FpRestoreFinishCb=="); }
|
||||
|
||||
SSyncFSM* createFsm() {
|
||||
SSyncFSM* pFsm = (SSyncFSM*)taosMemoryMalloc(sizeof(SSyncFSM));
|
||||
|
|
Loading…
Reference in New Issue