You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by da...@apache.org on 2024/07/14 15:57:57 UTC

(doris) branch master updated: [enhance](Vault) Provide guidance log when user encounters no default vault situation. (#37677)

This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 6492ee6b043 [enhance](Vault) Provide guidance log when user encounters no default vault situation. (#37677)
6492ee6b043 is described below

commit 6492ee6b043908ce058e159017c980b8a4eaaa23
Author: AlexYue <yj...@gmail.com>
AuthorDate: Sun Jul 14 23:57:50 2024 +0800

    [enhance](Vault) Provide guidance log when user encounters no default vault situation. (#37677)
    
    Provide more detailed guidance log for user who might encounter no
    default vault situation.
---
 .../main/java/org/apache/doris/datasource/InternalCatalog.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
index 910df9e1735..9812cf44a91 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
@@ -2511,11 +2511,17 @@ public class InternalCatalog implements CatalogIf<Database> {
                 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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org