gavinchou commented on code in PR #37537: URL: https://github.com/apache/doris/pull/37537#discussion_r1676840768
########## cloud/src/meta-service/meta_service_resource.cpp: ########## @@ -509,6 +509,80 @@ static void set_default_vault_log_helper(const InstanceInfoPB& instance, LOG(INFO) << vault_msg; } +static int alter_storage_vault(InstanceInfoPB& instance, std::unique_ptr<Transaction> txn, + const StorageVaultPB& vault, MetaServiceCode& code, + std::string& msg) { + if (!vault.has_obj_info()) { + code = MetaServiceCode::INVALID_ARGUMENT; + std::stringstream ss; + ss << "Only s3 vault can be altered"; Review Comment: Why not HDFS? ########## cloud/src/meta-service/meta_service_resource.cpp: ########## @@ -509,6 +509,80 @@ static void set_default_vault_log_helper(const InstanceInfoPB& instance, LOG(INFO) << vault_msg; } +static int alter_storage_vault(InstanceInfoPB& instance, std::unique_ptr<Transaction> txn, Review Comment: Add an UT to test it. And refer to `MetaServiceImpl::alter_obj_store_info` and `MetaServiceImpl::alter_instance` to abstract the behavior and make as flexible as possible. ########## cloud/src/meta-service/meta_service_resource.cpp: ########## @@ -575,22 +649,20 @@ void MetaServiceImpl::alter_obj_store_info(google::protobuf::RpcController* cont } break; } - case AlterObjStoreInfoRequest::ADD_BUILT_IN_VAULT: { Review Comment: Do not delete it, it will be used in the future. ########## cloud/src/meta-service/meta_service_http.cpp: ########## @@ -449,6 +449,7 @@ void MetaServiceImpl::http(::google::protobuf::RpcController* controller, {"show_storage_vaults", process_get_obj_store_info}, {"add_hdfs_vault", process_alter_obj_store_info}, {"add_s3_vault", process_alter_obj_store_info}, + {"alter_s3_vault", process_alter_obj_store_info}, Review Comment: It should be also a RPC, which can be called by FE -- 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