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

yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new e3560f6e01e branch-4.0: [chore](recycler) Log task type when delete 
data #56797 (#56819)
e3560f6e01e is described below

commit e3560f6e01e0891b7e3068fd45cc4cf97aeddaa5
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat Oct 11 17:33:21 2025 +0800

    branch-4.0: [chore](recycler) Log task type when delete data #56797 (#56819)
    
    Cherry-picked from #56797
    
    Co-authored-by: Yixuan Wang <[email protected]>
---
 cloud/src/recycler/recycler.cpp | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/cloud/src/recycler/recycler.cpp b/cloud/src/recycler/recycler.cpp
index 4b53439959e..9ca22c771c2 100644
--- a/cloud/src/recycler/recycler.cpp
+++ b/cloud/src/recycler/recycler.cpp
@@ -2209,8 +2209,8 @@ int InstanceRecycler::delete_rowset_data(
     for (const auto& [resource_id, tablet_id, rowset_id] : 
rowsets_delete_by_prefix) {
         LOG_INFO(
                 "delete rowset {} by prefix because it's in 
BEGIN_PARTIAL_UPDATE state, "
-                "resource_id={}, tablet_id={}, instance_id={}",
-                rowset_id, resource_id, tablet_id, instance_id_);
+                "resource_id={}, tablet_id={}, instance_id={}, task_type={}",
+                rowset_id, resource_id, tablet_id, instance_id_, 
metrics_context.operation_type);
         concurrent_delete_executor.add([&]() -> int {
             int ret = delete_rowset_data(resource_id, tablet_id, rowset_id);
             if (!ret) {
@@ -2430,6 +2430,7 @@ int InstanceRecycler::recycle_tablet(int64_t tablet_id, 
RecyclerMetricsContext&
                 .tag("max rowset creation time", max_rowset_creation_time)
                 .tag("min rowset expiration time", min_rowset_expiration_time)
                 .tag("max rowset expiration time", max_rowset_expiration_time)
+                .tag("task type", metrics_context.operation_type)
                 .tag("ret", ret);
     };
 
@@ -2568,7 +2569,8 @@ int InstanceRecycler::recycle_tablet(int64_t tablet_id, 
RecyclerMetricsContext&
                     int res = 
accessor_ptr->delete_directory(tablet_path_prefix(tablet_id));
                     if (res != 0) {
                         LOG(WARNING) << "failed to delete rowset data of 
tablet " << tablet_id
-                                     << " path=" << accessor_ptr->uri();
+                                     << " path=" << accessor_ptr->uri()
+                                     << " task type=" << 
metrics_context.operation_type;
                         return std::make_pair(-1, rs_id);
                     }
                     return std::make_pair(0, rs_id);
@@ -3063,7 +3065,8 @@ int InstanceRecycler::recycle_rowsets() {
             // 0x01 "recycle" ${instance_id} "rowset" ${tablet_id} 
${rowset_id} -> RecycleRowsetPB
             const auto& rowset_id = std::get<std::string>(std::get<0>(out[4]));
             LOG(INFO) << "delete rowset data, instance_id=" << instance_id_
-                      << " tablet_id=" << rowset.tablet_id() << " rowset_id=" 
<< rowset_id;
+                      << " tablet_id=" << rowset.tablet_id() << " rowset_id=" 
<< rowset_id
+                      << " task_type=" << metrics_context.operation_type;
             if (delete_rowset_data_by_prefix(std::string(k), 
rowset.resource_id(),
                                              rowset.tablet_id(), rowset_id) != 
0) {
                 return -1;
@@ -3095,7 +3098,8 @@ int InstanceRecycler::recycle_rowsets() {
                   << "] txn_id=" << rowset_meta->txn_id()
                   << " type=" << RecycleRowsetPB_Type_Name(rowset.type())
                   << " rowset_meta_size=" << v.size()
-                  << " creation_time=" << rowset_meta->creation_time();
+                  << " creation_time=" << rowset_meta->creation_time()
+                  << " task_type=" << metrics_context.operation_type;
         if (rowset.type() == RecycleRowsetPB::PREPARE) {
             // unable to calculate file path, can only be deleted by rowset id 
prefix
             num_prepare += 1;
@@ -3713,8 +3717,8 @@ int InstanceRecycler::recycle_tmp_rowsets() {
 
     auto handle_rowset_kv = [&num_scanned, &num_expired, &tmp_rowset_keys, 
&tmp_rowsets,
                              &expired_rowset_size, &total_rowset_key_size, 
&total_rowset_value_size,
-                             &earlest_ts, &tmp_rowset_ref_count_keys,
-                             this](std::string_view k, std::string_view v) -> 
int {
+                             &earlest_ts, &tmp_rowset_ref_count_keys, this,
+                             &metrics_context](std::string_view k, 
std::string_view v) -> int {
         ++num_scanned;
         total_rowset_key_size += k.size();
         total_rowset_value_size += v.size();
@@ -3763,7 +3767,8 @@ int InstanceRecycler::recycle_tmp_rowsets() {
                   << " version=[" << rowset.start_version() << '-' << 
rowset.end_version()
                   << "] txn_id=" << rowset.txn_id() << " rowset_meta_size=" << 
v.size()
                   << " creation_time=" << rowset.creation_time() << " 
num_scanned=" << num_scanned
-                  << " num_expired=" << num_expired;
+                  << " num_expired=" << num_expired
+                  << " task_type=" << metrics_context.operation_type;
 
         tmp_rowset_keys.emplace_back(k.data(), k.size());
         // Remove the rowset ref count key directly since it has not been used.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to