vagetablechicken opened a new issue #4736: URL: https://github.com/apache/incubator-doris/issues/4736
**Describe the bug** https://github.com/apache/incubator-doris/blob/a605b3160f27b2afac75ae9aa887f770a5ce7618/be/src/olap/tablet.cpp#L323-L333 We use `max_version` to find `iter`. And if `iter==end()`, it will return `end()->second`, cuz `DCHECK` won't effect in release mode. It'll cause a coredump, because the `->second` is a `RowsetSharedPtr`. **To Reproduce** Steps to reproduce the behavior: Setting an invalid `max_version` will reproduce it. Stack: ``` #0 std::__shared_ptr<doris::Rowset, (__gnu_cxx::_Lock_policy)2>::__shared_ptr (this=this@entry=0x7ffd2498a5e0) at /usr/include/c++/7.3.0/bits/shared_ptr_base.h:1121 #1 0x0000000000c9f2e1 in shared_ptr (this=0x7ffd2498a5e0) at /usr/include/c++/7.3.0/bits/shared_ptr.h:119 #2 doris::Tablet::rowset_with_max_version (this=<optimized out>) at /root/doris-env/doris/be/src/olap/tablet.cpp:333 ``` **Expected behavior** if `iter == _rs_version_map.end()`, return nullptr. ---------------------------------------------------------------- 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. 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