提交 2e6e9955 编写于 作者: H Hongze Cheng

fix sync bug

上级 ab8fa1d3
......@@ -86,7 +86,7 @@ void *tsdbDecodeSMFileEx(void *buf, SMFile *pMFile) {
}
int tsdbApplyMFileChange(SMFile *from, SMFile *to) {
ASSERT(from != NULL || to != NULL);
if (from == NULL && to == NULL) return 0;
if (from != NULL) {
if (to == NULL) {
......
......@@ -238,7 +238,7 @@ static int32_t tsdbSendMetaInfo(SSyncH *pSynch) {
tlen = tlen + tsdbEncodeSMFileEx(NULL, pMFile) + sizeof(TSCKSUM);
}
if (tsdbMakeRoom((void **)(&SYNC_BUFFER(pSynch)), tlen) < 0) {
if (tsdbMakeRoom((void **)(&SYNC_BUFFER(pSynch)), tlen + sizeof(tlen)) < 0) {
tsdbError("vgId:%d, failed to makeroom while send metainfo since %s", REPO_ID(pRepo), tstrerror(terrno));
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册