diff --git a/src/tsdb/src/tsdbFS.c b/src/tsdb/src/tsdbFS.c index 51c5a92edd2a33a8b6f2e56c02ce8ae53740068a..700d60546886ecff3d0ecf614bd54b521d8b9414 100644 --- a/src/tsdb/src/tsdbFS.c +++ b/src/tsdb/src/tsdbFS.c @@ -541,7 +541,7 @@ SDFileSet *tsdbFSIterNext(SFSIter *pIter) { pIter->index--; } - if (pIter->index > 0) { + if (pIter->index >= 0) { pIter->fid = ((SDFileSet *)taosArrayGet(pfs->cstatus->df, pIter->index))->fid; } else { pIter->fid = TSDB_IVLD_FID;