提交 8aad71c9 编写于 作者: H Hongze Cheng

more code

上级 d977929c
......@@ -232,6 +232,7 @@ int vnodeAsyncCommit(SVnode *pVnode) {
pInfo->info.state.committed = pVnode->state.applied;
pInfo->info.state.commitTerm = pVnode->state.applyTerm;
pInfo->info.state.commitID = pVnode->state.commitID;
pInfo->pVnode = pVnode;
vnodeScheduleTask(vnodeCommitTask, pInfo);
_exit:
......
......@@ -313,7 +313,11 @@ int32_t vnodeProcessWriteMsg(SVnode *pVnode, SRpcMsg *pMsg, int64_t version, SRp
// commit if need
if (vnodeShouldCommit(pVnode)) {
vInfo("vgId:%d, commit at version %" PRId64, TD_VID(pVnode), version);
#if 1
vnodeSyncCommit(pVnode);
#else
vnodeAsyncCommit(pVnode);
#endif
// start a new one
if (vnodeBegin(pVnode) < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册