提交 2f1bf1eb 编写于 作者: M Minghao Li

refactor(sync): make leader life longer

上级 f8b0c98a
...@@ -570,7 +570,7 @@ int32_t syncNodeOnAppendEntriesSnapshot2Cb(SSyncNode* ths, SyncAppendEntriesBatc ...@@ -570,7 +570,7 @@ int32_t syncNodeOnAppendEntriesSnapshot2Cb(SSyncNode* ths, SyncAppendEntriesBatc
// append entry batch // append entry batch
if (pass == 0) { if (pass == 0) {
// assert! no batch // assert! no batch
ASSERT(pMsg->dataCount == 1); ASSERT(pMsg->dataCount <= 1);
for (int32_t i = 0; i < pMsg->dataCount; ++i) { for (int32_t i = 0; i < pMsg->dataCount; ++i) {
SSyncRaftEntry* pAppendEntry = (SSyncRaftEntry*)(pMsg->data + metaTableArr[i].offset); SSyncRaftEntry* pAppendEntry = (SSyncRaftEntry*)(pMsg->data + metaTableArr[i].offset);
...@@ -698,7 +698,7 @@ int32_t syncNodeOnAppendEntriesSnapshot2Cb(SSyncNode* ths, SyncAppendEntriesBatc ...@@ -698,7 +698,7 @@ int32_t syncNodeOnAppendEntriesSnapshot2Cb(SSyncNode* ths, SyncAppendEntriesBatc
// append entry batch // append entry batch
if (pass == 0) { if (pass == 0) {
// assert! no batch // assert! no batch
ASSERT(pMsg->dataCount == 1); ASSERT(pMsg->dataCount <= 1);
// append entry batch // append entry batch
for (int32_t i = 0; i < pMsg->dataCount; ++i) { for (int32_t i = 0; i < pMsg->dataCount; ++i) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册