This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0-beta in repository https://gitbox.apache.org/repos/asf/doris.git
commit 2e4ba8252a2eabd74160a5ec58269afea7a1094e Author: HHoflittlefish777 <77738092+hhoflittlefish...@users.noreply.github.com> AuthorDate: Wed Jun 7 17:56:31 2023 +0800 [fix](lazy_open) fix lazy open null point (#20540) --- be/src/runtime/load_channel_mgr.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/be/src/runtime/load_channel_mgr.cpp b/be/src/runtime/load_channel_mgr.cpp index 2453e0dcf6..3fe4c7986d 100644 --- a/be/src/runtime/load_channel_mgr.cpp +++ b/be/src/runtime/load_channel_mgr.cpp @@ -143,11 +143,15 @@ Status LoadChannelMgr::open(const PTabletWriterOpenRequest& params) { Status LoadChannelMgr::open_partition(const OpenPartitionRequest& params) { UniqueId load_id(params.id()); std::shared_ptr<LoadChannel> channel; - auto it = _load_channels.find(load_id); - if (it != _load_channels.end()) { - channel = it->second; - } else { - return Status::InternalError("unknown load id, load id=" + load_id.to_string()); + { + std::lock_guard<std::mutex> l(_lock); + auto it = _load_channels.find(load_id); + if (it != _load_channels.end()) { + channel = it->second; + } else { + DCHECK(false); + return Status::InternalError("unknown load id, load id=" + load_id.to_string()); + } } RETURN_IF_ERROR(channel->open_partition(params)); return Status::OK(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org