[improve](streamload) do not print stack trace when get data from pipe meet cancel (#30297)

This commit is contained in:
HHoflittlefish777
2024-01-24 21:51:09 +08:00
committed by yiguolei
parent 2e6a00690f
commit 15728756e2

View File

@ -64,7 +64,7 @@ Status StreamLoadPipe::read_at_impl(size_t /*offset*/, Slice result, size_t* byt
}
// cancelled
if (_cancelled) {
return Status::InternalError("cancelled: {}", _cancelled_reason);
return Status::InternalError<false>("cancelled: {}", _cancelled_reason);
}
// finished
if (_buf_queue.empty()) {
@ -168,7 +168,7 @@ Status StreamLoadPipe::_read_next_buffer(std::unique_ptr<uint8_t[]>* data, size_
}
// cancelled
if (_cancelled) {
return Status::InternalError("cancelled: {}", _cancelled_reason);
return Status::InternalError<false>("cancelled: {}", _cancelled_reason);
}
// finished
if (_buf_queue.empty()) {
@ -210,7 +210,7 @@ Status StreamLoadPipe::_append(const ByteBufferPtr& buf, size_t proto_byte_size)
}
}
if (_cancelled) {
return Status::InternalError("cancelled: {}", _cancelled_reason);
return Status::InternalError<false>("cancelled: {}", _cancelled_reason);
}
_buf_queue.push_back(buf);
if (_use_proto) {