github-actions[bot] commented on code in PR #68756:
URL: https://github.com/apache/doris/pull/68756#discussion_r4322420662
##########
cloud/src/meta-service/meta_service_txn.cpp:
##########
@@ -4804,10 +4807,12 @@ void MetaServiceImpl::get_prepare_txn_by_coordinator(
return TxnErrorCode::TXN_INVALID_DATA;
}
const auto& coordinate = info_pb.coordinator();
+ // Backend IDs survive address changes; use the address only for
legacy unknown IDs.
+ const bool same_coordinator = (coordinate.id() != 0 && request->id()
!= 0)
+ ? coordinate.id() ==
request->id()
Review Comment:
[P2] Record the BE incarnation before matching restart cleanup by ID
For an FQDN-registered BE restarting with the same backend ID, a new-process
stream load can begin after the BE applies its first heartbeat but before
`HeartbeatMgr` consumes the response. `FrontendServiceImpl.loadTxnBeginImpl`
stamps `coordinator.startTime` from the FE's still-old `Backend.lastStartTime`,
rather than the initiating process's epoch. Once the response updates that
epoch, the enabled-by-default restart cleanup now selects this live PREPARED
transaction by ID because its recorded time is below the new cutoff; the former
IP/FQDN comparison excluded it. Heartbeat responses are consumed in
future-submission order, so an earlier slow backend can extend this window.
Per-ID abort's committed-status guards do not protect a load still in progress.
Please carry/validate the BE's actual process epoch at begin, or provide an
equivalent startup fence, and test a begin between heartbeat receipt and FE
response handling; the equal-timestamp unit cases do not cover this interleavin
g.
--
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]