You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/04/18 03:52:57 UTC

[incubator-doris] branch revert-8976-remove_useless_code created (now 57ded42d65)

This is an automated email from the ASF dual-hosted git repository.

morningman pushed a change to branch revert-8976-remove_useless_code
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


      at 57ded42d65 Revert "[Refactor] remove some useless code (#8976)"

This branch includes the following new commits:

     new 57ded42d65 Revert "[Refactor] remove some useless code (#8976)"

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[incubator-doris] 01/01: Revert "[Refactor] remove some useless code (#8976)"

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch revert-8976-remove_useless_code
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git

commit 57ded42d65da7c493702c825bcfc28607d7f5e45
Author: Mingyu Chen <mo...@gmail.com>
AuthorDate: Mon Apr 18 11:52:53 2022 +0800

    Revert "[Refactor] remove some useless code (#8976)"
    
    This reverts commit de7dce4df84fcbfbbaf715cbac151e802321f80f.
---
 be/src/exec/tablet_sink.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/be/src/exec/tablet_sink.cpp b/be/src/exec/tablet_sink.cpp
index dcd17dcb0a..e8b35c16d1 100644
--- a/be/src/exec/tablet_sink.cpp
+++ b/be/src/exec/tablet_sink.cpp
@@ -65,6 +65,7 @@ NodeChannel::~NodeChannel() noexcept {
         delete _add_batch_closure;
         _add_batch_closure = nullptr;
     }
+    _cur_add_batch_request.release_id();
 }
 
 // if "_cancelled" is set to true,
@@ -143,6 +144,8 @@ void NodeChannel::open() {
     }
     _stub->tablet_writer_open(&_open_closure->cntl, &request, &_open_closure->result,
                               _open_closure);
+    request.release_id();
+    request.release_schema();
 }
 
 void NodeChannel::_cancel_with_msg(const std::string& msg) {
@@ -443,13 +446,16 @@ void NodeChannel::cancel(const std::string& cancel_msg) {
     auto closure = new RefCountClosure<PTabletWriterCancelResult>();
 
     closure->ref();
-    int remain_ms = std::max(_rpc_timeout_ms - _timeout_watch.elapsed_time() / NANOS_PER_MILLIS,
-                             (unsigned long long)config::min_load_rpc_timeout_ms);
+    int remain_ms = _rpc_timeout_ms - _timeout_watch.elapsed_time() / NANOS_PER_MILLIS;
+    if (UNLIKELY(remain_ms < config::min_load_rpc_timeout_ms)) {
+        remain_ms = config::min_load_rpc_timeout_ms;
+    }
     closure->cntl.set_timeout_ms(remain_ms);
     if (config::tablet_writer_ignore_eovercrowded) {
         closure->cntl.ignore_eovercrowded();
     }
     _stub->tablet_writer_cancel(&closure->cntl, &request, &closure->result, closure);
+    request.release_id();
 }
 
 int NodeChannel::try_send_and_fetch_status(RuntimeState* state,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org