snapshot from -1
This commit is contained in:
parent
6953688761
commit
250622d1de
|
@ -35,6 +35,8 @@ int vnodeCreate(const char *path, SVnodeCfg *pCfg, STfs *pTfs) {
|
|||
|
||||
snprintf(dir, TSDB_FILENAME_LEN, "%s%s%s", tfsGetPrimaryPath(pTfs), TD_DIRSEP, path);
|
||||
info.config = *pCfg;
|
||||
info.state.committed = -1;
|
||||
info.state.applied = -1;
|
||||
|
||||
if (vnodeSaveInfo(dir, &info) < 0 || vnodeCommitInfo(dir, &info) < 0) {
|
||||
vError("vgId: %d failed to save vnode config since %s", pCfg->vgId, tstrerror(terrno));
|
||||
|
|
|
@ -85,9 +85,15 @@ int32_t vnodeSendMsg(void *rpcHandle, const SEpSet *pEpSet, SRpcMsg *pMsg) {
|
|||
}
|
||||
|
||||
int32_t vnodeSyncGetSnapshotCb(struct SSyncFSM *pFsm, SSnapshot *pSnapshot) {
|
||||
SVnode *pVnode = (SVnode *)(pFsm->data);
|
||||
vnodeGetSnapshot(pVnode, pSnapshot);
|
||||
|
||||
/*
|
||||
pSnapshot->data = NULL;
|
||||
pSnapshot->lastApplyIndex = 0;
|
||||
pSnapshot->lastApplyTerm = 0;
|
||||
*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue