fix some bug
This commit is contained in:
parent
aa08b76479
commit
e39a08f763
|
@ -570,11 +570,6 @@ int32_t tsdbFSCopy(STsdb *pTsdb, STsdbFS *pFS) {
|
||||||
}
|
}
|
||||||
*fSet.pSmaF = *pSet->pSmaF;
|
*fSet.pSmaF = *pSet->pSmaF;
|
||||||
|
|
||||||
if (taosArrayPush(pFS->aDFileSet, &fSet) == NULL) {
|
|
||||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
|
||||||
goto _exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// last
|
// last
|
||||||
for (fSet.nLastF = 0; fSet.nLastF < pSet->nLastF; fSet.nLastF++) {
|
for (fSet.nLastF = 0; fSet.nLastF < pSet->nLastF; fSet.nLastF++) {
|
||||||
fSet.aLastF[fSet.nLastF] = (SLastFile *)taosMemoryMalloc(sizeof(SLastFile));
|
fSet.aLastF[fSet.nLastF] = (SLastFile *)taosMemoryMalloc(sizeof(SLastFile));
|
||||||
|
@ -584,6 +579,11 @@ int32_t tsdbFSCopy(STsdb *pTsdb, STsdbFS *pFS) {
|
||||||
}
|
}
|
||||||
*fSet.aLastF[fSet.nLastF] = *pSet->aLastF[fSet.nLastF];
|
*fSet.aLastF[fSet.nLastF] = *pSet->aLastF[fSet.nLastF];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (taosArrayPush(pFS->aDFileSet, &fSet) == NULL) {
|
||||||
|
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
|
goto _exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
|
@ -958,9 +958,7 @@ int32_t tsdbFSCommit2(STsdb *pTsdb, STsdbFS *pFSNew) {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
_add_new:
|
_add_new:
|
||||||
fSet.diskId = pSetNew->diskId;
|
fSet = (SDFileSet){.diskId = pSetNew->diskId, .fid = pSetNew->fid, .nLastF = 1};
|
||||||
fSet.fid = pSetNew->fid;
|
|
||||||
fSet.nLastF = 1;
|
|
||||||
|
|
||||||
// head
|
// head
|
||||||
fSet.pHeadF = (SHeadFile *)taosMemoryMalloc(sizeof(SHeadFile));
|
fSet.pHeadF = (SHeadFile *)taosMemoryMalloc(sizeof(SHeadFile));
|
||||||
|
|
Loading…
Reference in New Issue