gavinchou commented on code in PR #37293:
URL: https://github.com/apache/doris/pull/37293#discussion_r1699324999


##########
cloud/src/meta-service/meta_service_job.cpp:
##########
@@ -961,11 +1027,48 @@ void process_schema_change_job(MetaServiceCode& code, 
std::string& msg, std::str
         return;
     }
 
+    auto new_tablet_job_key = job_tablet_key(
+            {instance_id, new_table_id, new_index_id, new_partition_id, 
new_tablet_id});
+
+    std::string new_tablet_job_val;
+    err = txn->get(new_tablet_job_key, &new_tablet_job_val);
+    if (err != TxnErrorCode::TXN_OK) {
+        SS << (err == TxnErrorCode::TXN_KEY_NOT_FOUND ? "job not found," : 
"internal error,")
+           << " instance_id=" << instance_id << " tablet_id=" << new_tablet_id
+           << " job=" << proto_to_json(request->job()) << " err=" << err;
+        msg = ss.str();
+        code = err == TxnErrorCode::TXN_KEY_NOT_FOUND ? 
MetaServiceCode::INVALID_ARGUMENT
+                                                      : 
cast_as<ErrCategory::READ>(err);
+        return;
+    }
+    TabletJobInfoPB new_recorded_job;
+    if (!new_recorded_job.ParseFromString(new_tablet_job_val)) {
+        code = MetaServiceCode::PROTOBUF_PARSE_ERR;
+        msg = "malformed new tablet recorded job";
+        return;
+    }
+
     
//==========================================================================
     //                               Abort
     
//==========================================================================
     if (request->action() == FinishTabletJobRequest::ABORT) {
-        // TODO(cyx)
+        if (schema_change.new_tablet_idx().index_id() ==
+                    recorded_schema_change.new_tablet_idx().index_id() &&
+            schema_change.new_tablet_idx().tablet_id() ==
+                    recorded_schema_change.new_tablet_idx().tablet_id()) {
+            // TODO(cyx)

Review Comment:
   remove it



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to