refactor: modify syncNodeAppendEntriesPeersSnapshot
This commit is contained in:
parent
80c4e77b0b
commit
df4787eff1
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue