hust-hhb commented on code in PR #47988:
URL: https://github.com/apache/doris/pull/47988#discussion_r2006752034


##########
cloud/src/meta-service/meta_service_job.cpp:
##########
@@ -1509,18 +1510,29 @@ void 
MetaServiceImpl::finish_tablet_job(::google::protobuf::RpcController* contr
     recorded_job.ParseFromString(job_val);
     VLOG_DEBUG << "get tablet job, tablet_id=" << tablet_id
                << " job=" << proto_to_json(recorded_job);
+    FinishTabletJobRequest_Action action = request->action();
 
-    std::unique_ptr<int, std::function<void(int*)>> defer_commit(
-            (int*)0x01, [&ss, &txn, &code, &msg, &need_commit](int*) {
-                if (!need_commit) return;
-                TxnErrorCode err = txn->commit();
-                if (err != TxnErrorCode::TXN_OK) {
-                    code = cast_as<ErrCategory::COMMIT>(err);
-                    ss << "failed to commit job kv, err=" << err;
-                    msg = ss.str();
-                    return;
+    std::unique_ptr<int, std::function<void(int*)>> defer_commit((int*)0x01, 
[&ss, &txn, &code,
+                                                                              
&msg, &need_commit,
+                                                                              
&action](int*) {
+        if (!need_commit) return;
+        TxnErrorCode err = txn->commit();
+        if (err != TxnErrorCode::TXN_OK) {
+            if (err == TxnErrorCode::TXN_CONFLICT) {
+                if (action == FinishTabletJobRequest::COMMIT) {
+                    
g_bvar_delete_bitmap_lock_txn_remove_conflict_by_compaction_commit_counter << 1;

Review Comment:
   Even though none mow doesn't have delete bitmap lock conflict, it may have 
some other confict, i think it's better to record too.



-- 
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