github-actions[bot] commented on code in PR #45685:
URL: https://github.com/apache/doris/pull/45685#discussion_r1893331371


##########
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:
   warning: function 'alter_hdfs_storage_vault' exceeds recommended 
size/complexity thresholds [readability-function-size]
   ```cpp
   static int alter_hdfs_storage_vault(InstanceInfoPB& instance, 
std::unique_ptr<Transaction>& txn,
              ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **cloud/src/meta-service/meta_service_resource.cpp:534:** 116 lines 
including whitespace and comments (threshold 80)
   ```cpp
   static int alter_hdfs_storage_vault(InstanceInfoPB& instance, 
std::unique_ptr<Transaction>& txn,
              ^
   ```
   
   </details>
   



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