Skip to content

Commit

Permalink
[enhance](Vault) Provide guidance log when user encounters no default…
Browse files Browse the repository at this point in the history
… vault situation. (#37677)

Provide more detailed guidance log for user who might encounter no
default vault situation.
  • Loading branch information
ByteYue authored and dataroaring committed Jul 17, 2024
1 parent 3778f3f commit b5bce95
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2527,11 +2527,17 @@ private boolean createOlapTable(Database db, CreateTableStmt stmt) throws UserEx
if (info != null) {
storageVaultName = info.first;
storageVaultId = info.second;
} else {
throw new DdlException("No default storage vault."
+ " You can use `SHOW STORAGE VAULT` to get all available vaults,"
+ " and pick one set default vault with `SET <vault_name> AS DEFAULT STORAGE VAULT`");
}
}

if (storageVaultName == null || storageVaultName.isEmpty()) {
throw new DdlException("Invalid Storage Vault, please set one useful storage vault");
throw new DdlException("Invalid Storage Vault. "
+ " You can use `SHOW STORAGE VAULT` to get all available vaults,"
+ " and pick one to set the table property `\"storage_vault_name\" = \"<vault_name>\"`");
}

// Check if user has storage vault usage privilege
Expand Down

0 comments on commit b5bce95

Please sign in to comment.