SWJTU-ZhangLei commented on code in PR #45685: URL: https://github.com/apache/doris/pull/45685#discussion_r1897072894
########## cloud/src/meta-service/meta_service_resource.cpp: ########## @@ -523,9 +523,18 @@ static void set_default_vault_log_helper(const InstanceInfoPB& instance, LOG(INFO) << vault_msg; } -static int alter_hdfs_storage_vault(InstanceInfoPB& instance, std::unique_ptr<Transaction> txn, +static bool vault_exist(const InstanceInfoPB& instance, const std::string& new_vault_name) { + for (auto& name : instance.storage_vault_names()) { + if (new_vault_name == name) { + return true; + } + } + return false; +} + +static int alter_hdfs_storage_vault(InstanceInfoPB& instance, std::unique_ptr<Transaction>& txn, Review Comment: > add UT done ########## gensrc/proto/cloud.proto: ########## @@ -887,6 +887,9 @@ message AlterObjStoreInfoResponse { optional MetaServiceResponseStatus status = 1; optional string storage_vault_id = 2; optional bool default_storage_vault_replaced = 3; + + // storage_vault_name maybe changed, so return new storage_vault_name + optional string storage_vault_name = 4; Review Comment: > redundant vault name, using the name in request done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org