提交 1ff40068 编写于 作者: M Minghao Li

fix: send snapshot

上级 d04c1271
...@@ -178,15 +178,17 @@ int32_t syncNodeAppendEntriesPeersSnapshot(SSyncNode* pSyncNode) { ...@@ -178,15 +178,17 @@ int32_t syncNodeAppendEntriesPeersSnapshot(SSyncNode* pSyncNode) {
syncNodeAppendEntries(pSyncNode, pDestId, pMsg); syncNodeAppendEntries(pSyncNode, pDestId, pMsg);
syncAppendEntriesDestroy(pMsg); syncAppendEntriesDestroy(pMsg);
SSyncSnapshotSender* pSender = NULL; if (!snapshotSendingFinish) {
for (int i = 0; i < pSyncNode->replicaNum; ++i) { SSyncSnapshotSender* pSender = NULL;
if (syncUtilSameId(&((pSyncNode->replicasId)[i]), pDestId)) { for (int i = 0; i < pSyncNode->replicaNum; ++i) {
pSender = (pSyncNode->senders)[i]; if (syncUtilSameId(&((pSyncNode->replicasId)[i]), pDestId)) {
break; pSender = (pSyncNode->senders)[i];
break;
}
} }
ASSERT(pSender != NULL);
snapshotSenderStart(pSender);
} }
ASSERT(pSender != NULL);
snapshotSenderStart(pSender);
} else { } else {
ret = syncNodeGetPreIndexTerm(pSyncNode, nextIndex, &preLogIndex, &preLogTerm); ret = syncNodeGetPreIndexTerm(pSyncNode, nextIndex, &preLogIndex, &preLogTerm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册