fix sync bug
This commit is contained in:
parent
ab8fa1d36b
commit
2e6e995593
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue