platoneko commented on code in PR #28716: URL: https://github.com/apache/doris/pull/28716#discussion_r1434739950
########## be/src/olap/tablet.cpp: ########## @@ -457,8 +475,24 @@ Status Tablet::add_rowset(RowsetSharedPtr rowset) { return Status::OK(); } +Status Tablet::rowsets_in_version_map_unlocked(const std::vector<RowsetSharedPtr>& rowsets) { + for (auto&& rs : rowsets) { + if (auto it = _rs_version_map.find(rs->version()); it == _rs_version_map.end()) { Review Comment: `it` 是在 if else 语句中使用的局部变量不会被 if else 代码块以外使用,声明在 if 语句明确 `it` 作用域 -- 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