Merge pull request #23520 from taosdata/fix/TD-27057
fix: invalid read when file is deleted
This commit is contained in:
commit
4cf97ef6ae
|
@ -606,8 +606,10 @@ int32_t tsdbTFileSetRemove(STFileSet *fset) {
|
||||||
if (fset == NULL) return 0;
|
if (fset == NULL) return 0;
|
||||||
|
|
||||||
for (tsdb_ftype_t ftype = TSDB_FTYPE_MIN; ftype < TSDB_FTYPE_MAX; ++ftype) {
|
for (tsdb_ftype_t ftype = TSDB_FTYPE_MIN; ftype < TSDB_FTYPE_MAX; ++ftype) {
|
||||||
if (fset->farr[ftype] == NULL) continue;
|
if (fset->farr[ftype] != NULL) {
|
||||||
tsdbTFileObjRemove(fset->farr[ftype]);
|
tsdbTFileObjRemove(fset->farr[ftype]);
|
||||||
|
fset->farr[ftype] = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TARRAY2_DESTROY(fset->lvlArr, tsdbSttLvlRemove);
|
TARRAY2_DESTROY(fset->lvlArr, tsdbSttLvlRemove);
|
||||||
|
|
Loading…
Reference in New Issue