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 2021/11/08 13:58:28 UTC

[incubator-doris] 10/11: [Bug] Fix bug that memtracker in delta writer will be visited before initializd. (#7013)

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

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

commit 987ca1fbcf43a5bd05c08180688214dc579a3f38
Author: Mingyu Chen <mo...@gmail.com>
AuthorDate: Sat Nov 6 13:29:49 2021 +0800

    [Bug] Fix bug that memtracker in delta writer will be visited before initializd. (#7013)
---
 be/src/olap/delta_writer.cpp                | 5 +++++
 be/src/olap/task/engine_batch_load_task.cpp | 2 +-
 be/src/runtime/fragment_mgr.cpp             | 8 ++++++--
 be/src/service/internal_service.cpp         | 2 +-
 4 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/be/src/olap/delta_writer.cpp b/be/src/olap/delta_writer.cpp
index afa014b..3c0d2fc 100644
--- a/be/src/olap/delta_writer.cpp
+++ b/be/src/olap/delta_writer.cpp
@@ -343,6 +343,11 @@ OLAPStatus DeltaWriter::cancel() {
 }
 
 int64_t DeltaWriter::mem_consumption() const {
+    if (_mem_tracker == nullptr) {
+        // This method may be called before this writer is initialized.
+        // So _mem_tracker may be null.
+        return 0;
+    }
     return _mem_tracker->consumption();
 }
 
diff --git a/be/src/olap/task/engine_batch_load_task.cpp b/be/src/olap/task/engine_batch_load_task.cpp
index 8d1b6d2..2b6a95a 100644
--- a/be/src/olap/task/engine_batch_load_task.cpp
+++ b/be/src/olap/task/engine_batch_load_task.cpp
@@ -343,7 +343,7 @@ OLAPStatus EngineBatchLoadTask::_push(const TPushReq& request,
 
 OLAPStatus EngineBatchLoadTask::_delete_data(const TPushReq& request,
                                              std::vector<TTabletInfo>* tablet_info_vec) {
-    LOG(INFO) << "begin to process delete data. request=" << ThriftDebugString(request);
+    VLOG_DEBUG << "begin to process delete data. request=" << ThriftDebugString(request);
     DorisMetrics::instance()->delete_requests_total->increment(1);
 
     OLAPStatus res = OLAP_SUCCESS;
diff --git a/be/src/runtime/fragment_mgr.cpp b/be/src/runtime/fragment_mgr.cpp
index a8ff209..5cd403d 100644
--- a/be/src/runtime/fragment_mgr.cpp
+++ b/be/src/runtime/fragment_mgr.cpp
@@ -373,7 +373,11 @@ void FragmentExecState::coordinator_callback(const Status& status, RuntimeProfil
         try {
             coord->reportExecStatus(res, params);
         } catch (TTransportException& e) {
-            LOG(WARNING) << "Retrying ReportExecStatus: " << e.what();
+            LOG(WARNING) << "Retrying ReportExecStatus. query id: "
+                         << print_id(_query_id) << ", instance id: "
+                         << print_id(_fragment_instance_id)
+                         << " to " << _coord_addr
+                         << ", err: " << e.what();
             rpc_status = coord.reopen();
 
             if (!rpc_status.ok()) {
@@ -822,7 +826,7 @@ Status FragmentMgr::apply_filter(const PPublishFilterRequest* request, const cha
         auto iter = _fragment_map.find(tfragment_instance_id);
         if (iter == _fragment_map.end()) {
             VLOG_CRITICAL << "unknown.... fragment-id:" << fragment_instance_id;
-            return Status::InvalidArgument("fragment-id");
+            return Status::InvalidArgument("fragment-id: " + fragment_instance_id.to_string());
         }
         fragment_state = iter->second;
     }
diff --git a/be/src/service/internal_service.cpp b/be/src/service/internal_service.cpp
index 93dc6b1..3afab34 100644
--- a/be/src/service/internal_service.cpp
+++ b/be/src/service/internal_service.cpp
@@ -312,7 +312,7 @@ void PInternalServiceImpl<T>::apply_filter(::google::protobuf::RpcController* co
     VLOG_NOTICE << "rpc apply_filter recv";
     Status st = _exec_env->fragment_mgr()->apply_filter(request, attachment.to_string().data());
     if (!st.ok()) {
-        LOG(WARNING) << "apply filter meet error" << st.to_string();
+        LOG(WARNING) << "apply filter meet error: " << st.to_string();
     }
     st.to_protobuf(response->mutable_status());
 }

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