gavinchou commented on code in PR #70726:
URL: https://github.com/apache/doris/pull/70726#discussion_r4783956656
##########
cloud/src/meta-service/meta_service_txn.cpp:
##########
@@ -4192,7 +4192,15 @@ void
MetaServiceImpl::get_txn(::google::protobuf::RpcController* controller,
// step 2: get txn info from label pb
TxnLabelPB label_pb;
if (err == TxnErrorCode::TXN_OK) {
- if (label_val.size() <= VERSION_STAMP_LEN ||
+ // begin_txn commits the label with only its version stamp before
it writes the first
+ // transaction, so a label in that window has no transaction yet,
as get_txn_id reports.
+ if (label_val.size() == VERSION_STAMP_LEN) {
Review Comment:
@jaredmdobson I am curious that have you encounter this error before, the
prior is "failed to parse".
for a visible txn "label_val.size() == VERSION_STAMP_LEN" is impossible, it
is only possible that there are reused labels and some error (partial success)
occurs for the next use and try to get txn with that reused label.
--
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]