ByteYue commented on code in PR #38685:
URL: https://github.com/apache/doris/pull/38685#discussion_r1709056253


##########
cloud/src/meta-service/meta_service_resource.cpp:
##########
@@ -510,13 +510,115 @@ 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,
+                                    const StorageVaultPB& vault, 
MetaServiceCode& code,
+                                    std::string& msg) {
+    if (!vault.has_hdfs_info()) {

Review Comment:
   The following code would do the job.
   ```C++
   const auto& hdfs_info = vault.hdfs_info();
       if (hdfs_info.has_prefix() || !hdfs_info.has_build_conf() ||
           hdfs_info.build_conf().has_fs_name()) {
           code = MetaServiceCode::INVALID_ARGUMENT;
           std::stringstream ss;
           ss << "You can not alter prefix or fs name because it might lose 
previoud written data";
           msg = ss.str();
           return -1;
       }
   ```



-- 
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

Reply via email to