This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 2db900b775 [fix](lazy_open) fix lazy open null point (#20540)
2db900b775 is described below
commit 2db900b775197e8e54b8e1777e4f28e5dc503886
Author: HHoflittlefish777 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]