refactor(sync): add pre-commit interface
This commit is contained in:
parent
9a540919b9
commit
166331c377
|
@ -2501,19 +2501,15 @@ int32_t syncNodeOnClientRequestCb(SSyncNode* ths, SyncClientRequest* pMsg, SyncI
|
|||
// if mulit replica, start replicate right now
|
||||
if (ths->replicaNum > 1) {
|
||||
syncNodeReplicate(ths);
|
||||
}
|
||||
|
||||
// pre commit
|
||||
syncNodePreCommit(ths, pEntry, 0);
|
||||
}
|
||||
|
||||
// if only myself, maybe commit right now
|
||||
if (ths->replicaNum == 1) {
|
||||
syncMaybeAdvanceCommitIndex(ths);
|
||||
}
|
||||
|
||||
} else {
|
||||
// pre commit
|
||||
syncNodePreCommit(ths, pEntry, 0);
|
||||
}
|
||||
|
||||
if (pRetIndex != NULL) {
|
||||
|
|
Loading…
Reference in New Issue