pengxiangyu commented on a change in pull request #7529:
URL: https://github.com/apache/incubator-doris/pull/7529#discussion_r836080688
##########
File path: be/src/olap/tablet_manager.cpp
##########
@@ -232,6 +236,19 @@ OLAPStatus TabletManager::create_tablet(const
TCreateTabletReq& request,
LOG(INFO) << "begin to create tablet. tablet_id=" << tablet_id
<< ", schema_hash=" << schema_hash;
+ if (FilePathDesc::is_remote(request.storage_medium)) {
+ FilePathDesc path_desc;
+ path_desc.storage_medium = request.storage_medium;
+ path_desc.storage_name = request.storage_param.storage_name;
+ std::shared_ptr<Env> env = Env::get_env(path_desc);
+ if (env == nullptr) {
+ LOG(INFO) << "remote storage is not exist, create it.
storage_name: " << request.storage_param.storage_name;
+
RETURN_WITH_WARN_IF_ERROR(Env::get_remote_mgr()->create_remote_storage(
Review comment:
Remote storage is shared in RemoteEnvMgr. Env::get_env() will get the
shared_ptr from RemoteEnvMgr, path_desc will only take the storage_name and
medium type.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]