fix(query): close del file read handle.
This commit is contained in:
parent
f813a1f3ec
commit
ef0d705c5f
|
@ -1944,17 +1944,20 @@ int32_t initDelSkylineIterator(STableBlockScanInfo* pBlockScanInfo, STsdbReader*
|
||||||
if (pDelFile) {
|
if (pDelFile) {
|
||||||
SDelFReader* pDelFReader = NULL;
|
SDelFReader* pDelFReader = NULL;
|
||||||
code = tsdbDelFReaderOpen(&pDelFReader, pDelFile, pTsdb, NULL);
|
code = tsdbDelFReaderOpen(&pDelFReader, pDelFile, pTsdb, NULL);
|
||||||
if (code) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
|
|
||||||
SArray* aDelIdx = taosArrayInit(4, sizeof(SDelIdx));
|
SArray* aDelIdx = taosArrayInit(4, sizeof(SDelIdx));
|
||||||
if (aDelIdx == NULL) {
|
if (aDelIdx == NULL) {
|
||||||
|
tsdbDelFReaderClose(&pDelFReader);
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
|
|
||||||
code = tsdbReadDelIdx(pDelFReader, aDelIdx, NULL);
|
code = tsdbReadDelIdx(pDelFReader, aDelIdx, NULL);
|
||||||
if (code) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
|
taosArrayDestroy(aDelIdx);
|
||||||
|
tsdbDelFReaderClose(&pDelFReader);
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1964,6 +1967,8 @@ int32_t initDelSkylineIterator(STableBlockScanInfo* pBlockScanInfo, STsdbReader*
|
||||||
if (pIdx != NULL) {
|
if (pIdx != NULL) {
|
||||||
code = tsdbReadDelData(pDelFReader, pIdx, pDelData, NULL);
|
code = tsdbReadDelData(pDelFReader, pIdx, pDelData, NULL);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
|
taosArrayDestroy(aDelIdx);
|
||||||
|
tsdbDelFReaderClose(&pDelFReader);
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue