This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new c2358467589 [fix](move-memtable) close stream when cancel load stream
stub (#38912)
c2358467589 is described below
commit c2358467589b48bf2fa99f35338b1367b3f670fc
Author: Kaijie Chen <[email protected]>
AuthorDate: Tue Aug 6 17:39:33 2024 +0800
[fix](move-memtable) close stream when cancel load stream stub (#38912)
Fix load stream leak when sink v2 meet error.
Tested by `check_before_quit.groovy`.
---
be/src/vec/sink/load_stream_stub.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/be/src/vec/sink/load_stream_stub.cpp
b/be/src/vec/sink/load_stream_stub.cpp
index f322d67ceaf..1e7eda71f1e 100644
--- a/be/src/vec/sink/load_stream_stub.cpp
+++ b/be/src/vec/sink/load_stream_stub.cpp
@@ -339,6 +339,9 @@ Status LoadStreamStub::close_wait(RuntimeState* state,
int64_t timeout_ms) {
void LoadStreamStub::cancel(Status reason) {
LOG(WARNING) << *this << " is cancelled because of " << reason;
+ if (_is_init.load()) {
+ brpc::StreamClose(_stream_id);
+ }
{
std::lock_guard<bthread::Mutex> lock(_cancel_mutex);
_cancel_reason = reason;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]