github-actions[bot] commented on code in PR #67716:
URL: https://github.com/apache/doris/pull/67716#discussion_r3967741500
##########
cloud/src/meta-service/meta_service_txn.cpp:
##########
@@ -4658,6 +4658,19 @@ void MetaServiceImpl::get_prepare_txn_by_coordinator(
do {
err = txn->get(begin_info_key, end_info_key, &it, true);
+ TEST_SYNC_POINT_CALLBACK("get_prepare_txn_by_coordinator::range_get",
&err);
+ if (err == TxnErrorCode::TXN_TOO_OLD) {
+ stats.get_bytes += txn->get_bytes();
+ stats.get_counter += txn->num_get_keys();
+ txn.reset();
Review Comment:
[P2] Please release the failed FDB range future before retrying. A real
`TXN_TOO_OLD` comes from `fdb::Transaction::get(begin, end, ...)`, which
creates an `FDBFuture*` but returns on `fdb_future_get_error` before
transferring it to `RangeGetIterator`; unlike the single-key and batch paths,
it has no destroy guard. The [FoundationDB C
API](https://apple.github.io/foundationdb/api-c.html#c.fdb_future_destroy)
requires every returned future to be destroyed exactly once, and resetting the
transaction here does not destroy that future. This branch can recover multiple
expirations in one scan, leaking one future each time while still returning
success. Please RAII-own the future in the lower-layer range get and release it
only into `RangeGetIterator` on success. The MemKV test injects after a
successful get, so it cannot catch this production-only path.
--
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]