platoneko commented on code in PR #11026: URL: https://github.com/apache/doris/pull/11026#discussion_r927217568
########## be/src/olap/storage_policy_mgr.cpp: ########## @@ -24,43 +24,60 @@ namespace doris { -void StoragePolicyMgr::update(const std::string& name, StoragePolicyPtr policy) { - std::lock_guard<std::mutex> l(_mutex); - auto it = _policy_map.find(name); - if (it != _policy_map.end()) { - // just support change ak, sk, cooldown_ttl, cooldown_datetime - LOG(INFO) << "update storage policy name: " << name; - auto s3_fs = std::dynamic_pointer_cast<io::S3FileSystem>( - io::FileSystemMap::instance()->get(name)); - DCHECK(s3_fs); - s3_fs->set_ak(policy->s3_ak); - s3_fs->set_sk(policy->s3_sk); - s3_fs->connect(); - it->second = std::move(policy); - } else { - // can't find name's policy, so do nothing. +void StoragePolicyMgr::update(const std::string& name, const StoragePolicyPtr& policy) { Review Comment: i will fix soon -- 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