xy720 commented on code in PR #54516:
URL: https://github.com/apache/doris/pull/54516#discussion_r2269557551


##########
cloud/src/recycler/recycler.cpp:
##########
@@ -2901,55 +2907,85 @@ int InstanceRecycler::recycle_restore_jobs() {
         LOG(INFO) << "begin to recycle expired restore jobs, instance_id=" << 
instance_id_
                   << " restore_job_pb=" << restore_job_pb.DebugString();
 
-        std::string restore_job_rs_key0 = 
job_restore_rowset_key({instance_id_, tablet_id, 0});
-        std::string restore_job_rs_key1 = 
job_restore_rowset_key({instance_id_, tablet_id + 1, 0});
-
         std::unique_ptr<Transaction> txn;
-        std::string msg;
-        MetaServiceCode code = MetaServiceCode::OK;
-        if (code != MetaServiceCode::OK) {
-            LOG_WARNING("scan restore job rowsets failed when recycle restore 
jobs")
+        TxnErrorCode err = txn_kv_->create_txn(&txn);
+        if (err != TxnErrorCode::TXN_OK) {
+            LOG_WARNING("failed to recycle restore job")
+                    .tag("err", err)
                     .tag("tablet id", tablet_id)
-                    .tag("msg", msg)
-                    .tag("code", code)
-                    .tag("instance id", instance_id_);
+                    .tag("instance_id", instance_id_)
+                    .tag("reason", "failed to create txn");
             return -1;
         }
 
-        // Recycle all data and KV associated with the tablet.
-        // This includes rowsets, segments, and related resources.
-        if (recycle_tablet(tablet_id, metrics_context) != 0) {
-            LOG_WARNING("failed to recycle tablet")
-                    .tag("tablet_id", tablet_id)
-                    .tag("instance_id", instance_id_);
+        std::string val;
+        err = txn->get(k, &val);

Review Comment:
   recycler已经有单测了



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to