Merge pull request #15928 from taosdata/feature/3.0_mhli

fix(sync): delete memory after optimized
This commit is contained in:
Li Minghao 2022-08-10 13:10:55 +08:00 committed by GitHub
commit 659771ae32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -199,7 +199,6 @@ int32_t syncNodeAppendEntriesPeersSnapshot2(SSyncNode* pSyncNode) {
// send msg
syncNodeAppendEntriesBatch(pSyncNode, pDestId, pMsg);
syncAppendEntriesBatchDestroy(pMsg);
// speed up
if (pMsg->dataCount > 0 && pSyncNode->commitIndex - pMsg->prevLogIndex > SYNC_SLOW_DOWN_RANGE) {
@ -216,6 +215,8 @@ int32_t syncNodeAppendEntriesPeersSnapshot2(SSyncNode* pSyncNode) {
} while (0);
#endif
}
syncAppendEntriesBatchDestroy(pMsg);
}
return ret;