Merge pull request #15442 from taosdata/feature/3.0_mhli
refactor(sync): add pre-commit interface
This commit is contained in:
commit
5cd9c946a2
|
@ -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);
|
||||
// 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