github-actions[bot] commented on code in PR #16812: URL: https://github.com/apache/doris/pull/16812#discussion_r1108241611
########## be/src/olap/tablet.cpp: ########## @@ -1807,13 +1798,32 @@ Status Tablet::_read_cooldown_meta(io::RemoteFileSystem* fs, int64_t cooldown_re return Status::OK(); } -Status Tablet::_write_cooldown_meta(io::RemoteFileSystem* fs, UniqueId cooldown_meta_id, - RowsetMeta* new_rs_meta) { +Status Tablet::write_cooldown_meta(const std::shared_ptr<io::RemoteFileSystem>& fs, + UniqueId cooldown_meta_id, const RowsetMetaSharedPtr& new_rs_meta, + const std::vector<RowsetMetaSharedPtr>& to_deletes) { std::vector<RowsetMetaSharedPtr> cooldowned_rs_metas; { std::shared_lock meta_rlock(_meta_lock); + std::set<std::string> rs_meta_set; for (auto& rs_meta : _tablet_meta->all_rs_metas()) { if (!rs_meta->is_local()) { + rs_meta_set.emplace(rs_meta->version().to_string()); + } Review Comment: warning: no member named 'version' in 'std::shared_ptr<doris::RowsetMeta>'; did you mean to use '->' instead of '.'? [clang-diagnostic-error] ```suggestion rs_meta->version().to_string()); ``` ########## be/src/olap/tablet.cpp: ########## @@ -1807,13 +1798,32 @@ return Status::OK(); } -Status Tablet::_write_cooldown_meta(io::RemoteFileSystem* fs, UniqueId cooldown_meta_id, - RowsetMeta* new_rs_meta) { +Status Tablet::write_cooldown_meta(const std::shared_ptr<io::RemoteFileSystem>& fs, + UniqueId cooldown_meta_id, const RowsetMetaSharedPtr& new_rs_meta, + const std::vector<RowsetMetaSharedPtr>& to_deletes) { std::vector<RowsetMetaSharedPtr> cooldowned_rs_metas; { std::shared_lock meta_rlock(_meta_lock); + std::set<std::string> rs_meta_set; for (auto& rs_meta : _tablet_meta->all_rs_metas()) { if (!rs_meta->is_local()) { + rs_meta_set.emplace(rs_meta->version().to_string()); + } + } + + std::set<std::string> to_delete_set; + for (auto& rs_meta : to_deletes) { + if (rs_meta_set.find(rs_meta->version().to_string()) == rs_meta_set.end()) { Review Comment: warning: no member named 'version' in 'std::shared_ptr<doris::RowsetMeta>'; did you mean to use '->' instead of '.'? [clang-diagnostic-error] ```suggestion (auto& rs_meta : to_deletes) {-> ``` -- 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