platoneko commented on code in PR #33308:
URL: https://github.com/apache/doris/pull/33308#discussion_r1555654600


##########
cloud/src/meta-service/meta_service.cpp:
##########
@@ -560,6 +560,11 @@ void 
MetaServiceImpl::create_tablets(::google::protobuf::RpcController* controll
             return;
         }
 
+        // This instance hasn't enable storage vault which means it's using 
legacy cloud mode
+        if (!instance.enable_storage_vault()) {

Review Comment:
   加个 DCHECK 吧,按理说 FE 在 `!enable_storage_vault` 时不应该 `has_storage_vault_name`



##########
cloud/src/meta-service/meta_service_resource.cpp:
##########
@@ -400,9 +397,7 @@ static int add_hdfs_storage_vault(InstanceInfoPB& instance, 
Transaction* txn,
     storage_vault_key({instance.instance_id(), vault_id}, &key);
     hdfs_param.set_id(vault_id);
     if (vault_id == BUILT_IN_STORAGE_VAULT_ID) {
-        hdfs_param.set_name(BUILT_IN_STORAGE_VAULT_NAME);
-        instance.set_default_storage_vault_name(BUILT_IN_STORAGE_VAULT_NAME);
-        instance.set_default_storage_vault_id(BUILT_IN_STORAGE_VAULT_ID);
+        hdfs_param.set_name(BUILT_IN_STORAGE_VAULT_NAME.data());

Review Comment:
   BUILT_IN_STORAGE_VAULT_ID 可能用不到,考虑直接在 create instance 函数给 vault 设置 name = 
BUILT_IN_STORAGE_VAULT_NAME



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