tfs: support disable create new file

This commit is contained in:
kailixu 2024-12-31 08:34:17 +08:00
parent 4c41008657
commit fa694d6fe3
1 changed files with 9 additions and 0 deletions

View File

@ -607,6 +607,15 @@ static int32_t tfsCheck(STfs *pTfs) {
terrno = TSDB_CODE_FS_NO_MOUNT_AT_TIER;
return -1;
}
if (level == 0) {
tfsUpdateTierSize(TFS_TIER_AT(pTfs, level));
if (TFS_TIER_AT(pTfs, level)->nAvailDisks == 0) {
fError("no disk to create new file at level %d", level);
terrno = TSDB_CODE_FS_NO_VALID_DISK;
return -1;
}
}
}
return 0;