eldenmoon commented on code in PR #45026: URL: https://github.com/apache/doris/pull/45026#discussion_r1870997794
########## be/src/olap/base_tablet.h: ########## @@ -279,7 +279,10 @@ class BaseTablet { int limit); // Return the merged schema of all rowsets - virtual TabletSchemaSPtr merged_tablet_schema() const { return _max_version_schema; } + virtual TabletSchemaSPtr merged_tablet_schema() const { + std::shared_lock rlock(_meta_lock); + return _max_version_schema; Review Comment: _max_version_schema 原有结构可能有线程修改并析构(赋值过程中),这里 不加锁可能返回一个析构后的指针,造成heap use after free -- 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