refactor: modify syncNodeAppendEntriesPeersSnapshot

This commit is contained in:
Minghao Li 2022-06-01 17:08:03 +08:00
parent 80c4e77b0b
commit df4787eff1
1 changed files with 2 additions and 0 deletions

View File

@ -144,6 +144,8 @@ int32_t syncNodeAppendEntriesPeersSnapshot(SSyncNode* pSyncNode) {
sInfo("nextIndex:%ld in snapshot: <lastApplyIndex:%ld, lastApplyTerm:%lu>, begin snapshot", nextIndex, sInfo("nextIndex:%ld in snapshot: <lastApplyIndex:%ld, lastApplyTerm:%lu>, begin snapshot", nextIndex,
snapshot.lastApplyIndex, snapshot.lastApplyTerm); snapshot.lastApplyIndex, snapshot.lastApplyTerm);
// do not use next index
// always send from new last index + 1
SyncIndex lastIndex; SyncIndex lastIndex;
SyncTerm lastTerm; SyncTerm lastTerm;
ret = syncNodeGetLastIndexTerm(pSyncNode, &lastIndex, &lastTerm); ret = syncNodeGetLastIndexTerm(pSyncNode, &lastIndex, &lastTerm);