liaoxin01 commented on code in PR #57767:
URL: https://github.com/apache/doris/pull/57767#discussion_r2550160523
##########
be/src/runtime/load_channel_mgr.cpp:
##########
@@ -193,10 +214,31 @@ Status LoadChannelMgr::cancel(const
PTabletWriterCancelRequest& params) {
std::shared_ptr<LoadChannel> cancelled_channel;
{
std::lock_guard<std::mutex> l(_lock);
- if (_load_channels.find(load_id) != _load_channels.end()) {
+ if (_load_channels.contains(load_id)) {
cancelled_channel = _load_channels[load_id];
_load_channels.erase(load_id);
}
+ // We just need to record the first cancel msg
+ auto* existing_handle =
_load_state_channels->lookup(load_id.to_string());
+ if (existing_handle == nullptr) {
+ if (params.has_cancel_reason() && !params.cancel_reason().empty())
{
+ std::unique_ptr<CacheValue> cancel_reason_ptr =
std::make_unique<CacheValue>();
+ cancel_reason_ptr->_cancel_reason = params.cancel_reason();
+ size_t cache_capacity =
cancel_reason_ptr->_cancel_reason.capacity();
Review Comment:
capacity should be the the size of entire CacheValue object.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]