Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix](runtime_profile) fix race condition in to_thrift (apache#45047)
### What problem does this PR solve? Fix race condition in `RuntimeProfile::to_thrift()`. ``` #6 0x000055bce5a78bbf in std::__throw_length_error (__s=0x55bca1eb7880 <str> "vector::reserve") at ../../../../../libstdc++-v3/src/c++11/functexcept.cc:82 #7 0x000055bcafbbbc8f in std::vector<doris::TRuntimeProfileNode, std::allocator<doris::TRuntimeProfileNode> >::reserve (this=this@entry=0x7f2e69c39f48, __n=<optimized out>) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/vector.tcc:70 #8 0x000055bcafbb6e34 in doris::RuntimeProfile::to_thrift (this=<optimized out>, nodes=0x7f2e69c39f48) at /root/doris/be/src/util/runtime_profile.cpp:577 #9 0x000055bcafbb7780 in doris::RuntimeProfile::to_thrift (this=<optimized out>, nodes=0x7f2e69c39f48) at /root/doris/be/src/util/runtime_profile.cpp:612 #10 0x000055bcafbb7780 in doris::RuntimeProfile::to_thrift (this=<optimized out>, nodes=0x7f2e69c39f48) at /root/doris/be/src/util/runtime_profile.cpp:612 #11 0x000055bcafbb7780 in doris::RuntimeProfile::to_thrift (this=<optimized out>, nodes=0x7f2e69c39f48) at /root/doris/be/src/util/runtime_profile.cpp:612 #12 0x000055bcaf32ee52 in doris::LoadChannel::_report_profile (this=this@entry=0x6150116fca80, response=response@entry=0x61201b768340) ```
- Loading branch information