This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new b09ecc2c585 [chore](cloud) fix commit_txn logs for single version
(#58559)
b09ecc2c585 is described below
commit b09ecc2c585b619551f62ee155b6f05c2bb1c7ad
Author: walter <[email protected]>
AuthorDate: Thu Dec 4 16:21:45 2025 +0800
[chore](cloud) fix commit_txn logs for single version (#58559)
---
cloud/src/meta-service/meta_service_txn.cpp | 6 +++---
cloud/src/recycler/recycler_operation_log.cpp | 5 +++++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/cloud/src/meta-service/meta_service_txn.cpp
b/cloud/src/meta-service/meta_service_txn.cpp
index afd51268e56..41ee486f50a 100644
--- a/cloud/src/meta-service/meta_service_txn.cpp
+++ b/cloud/src/meta-service/meta_service_txn.cpp
@@ -1817,7 +1817,6 @@ void MetaServiceImpl::commit_txn_immediately(
LOG(INFO) << "remove running_key=" << hex(running_key) << " txn_id="
<< txn_id;
txn->remove(running_key);
- std::string recycle_key = recycle_txn_key({instance_id, db_id,
txn_id});
RecycleTxnPB recycle_pb;
recycle_pb.set_creation_time(commit_time);
recycle_pb.set_label(txn_info.label());
@@ -1834,6 +1833,7 @@ void MetaServiceImpl::commit_txn_immediately(
LOG(INFO) << "put commit txn operation log, key=" << hex(log_key)
<< " txn_id=" << txn_id;
} else {
+ std::string recycle_key = recycle_txn_key({instance_id, db_id,
txn_id});
std::string recycle_val;
if (!recycle_pb.SerializeToString(&recycle_val)) {
code = MetaServiceCode::PROTOBUF_SERIALIZE_ERR;
@@ -1842,6 +1842,8 @@ void MetaServiceImpl::commit_txn_immediately(
return;
}
txn->put(recycle_key, recycle_val);
+ LOG(INFO) << "xxx commit_txn put recycle_key key=" <<
hex(recycle_key)
+ << " txn_id=" << txn_id;
}
if (txn_info.load_job_source_type() ==
@@ -1859,8 +1861,6 @@ void MetaServiceImpl::commit_txn_immediately(
}
}
- LOG(INFO) << "xxx commit_txn put recycle_key key=" << hex(recycle_key)
- << " txn_id=" << txn_id;
LOG(INFO) << "commit_txn put_size=" << txn->put_bytes()
<< " del_size=" << txn->delete_bytes() << " num_put_keys="
<< txn->num_put_keys()
<< " num_del_keys=" << txn->num_del_keys()
diff --git a/cloud/src/recycler/recycler_operation_log.cpp
b/cloud/src/recycler/recycler_operation_log.cpp
index c9ea3f0ba99..af5ce1224bd 100644
--- a/cloud/src/recycler/recycler_operation_log.cpp
+++ b/cloud/src/recycler/recycler_operation_log.cpp
@@ -585,6 +585,11 @@ static TxnErrorCode get_txn_info(TxnKv* txn_kv,
std::string_view instance_id, in
std::string txn_info_value;
err = txn->get(key, &txn_info_value);
if (err != TxnErrorCode::TXN_OK) {
+ LOG_WARNING("failed to get txn info")
+ .tag("key", hex(key))
+ .tag("db_id", db_id)
+ .tag("txn_id", txn_id)
+ .tag("error_code", err);
return err;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]