mymeiyi commented on code in PR #47988:
URL: https://github.com/apache/doris/pull/47988#discussion_r2006730006
##########
fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java:
##########
@@ -1213,6 +1293,26 @@ public boolean commitAndPublishTransaction(DatabaseIf
db, long transactionId,
}
throw e;
} finally {
+ stopWatch.stop();
+ String detailMsg = "";
+ if (commitCostTimeStatisticMap.containsKey(transactionId)) {
Review Comment:
can move this into the `if (costTimeMs > 1000)` to skip construct the
`detailMsg` if log is not needed
##########
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:
is it needed for none mow table?
--
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]