jaredmdobson opened a new issue, #70586:
URL: https://github.com/apache/doris/issues/70586

   **Version:** Apache Doris 4.1.5, cloud mode.
   
   **Symptom:** During transaction commit, the FE logged a Meta Service lookup 
failure with `KV_TXN_GET_ERR` / `RetryableNotCommitted`, then returned a 
transaction-does-not-exist error to the caller about 1 ms later. The caller 
cannot distinguish a definitive missing transaction from a failed lookup with 
an unknown transaction outcome. This observation establishes neither 
transaction expiry nor the underlying cause of the KV failure.
   
   **Code path:** On `apache/doris` master, 
`CloudGlobalTransactionMgr.getTransactionState` returns `null` when the Meta 
Service response is non-OK, including lookup failures. 
`commitAndPublishTransaction` interprets that `null` as a missing transaction 
and throws `TransactionCommitFailedException`.
   
   - [Master: lookup and non-OK response handling, 
CloudGlobalTransactionMgr.java:2595–2630](https://github.com/apache/doris/blob/master/fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java#L2595-L2630).
   - [Master: commit maps null to missing transaction, lines 
483–486](https://github.com/apache/doris/blob/master/fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java#L483-L486).
   - Master inspected at commit 
[`42b148bac33f798edc9f8ae984a462b1b4a4f472`](https://github.com/apache/doris/blob/42b148bac33f798edc9f8ae984a462b1b4a4f472/fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java#L2595-L2630);
 master line numbers may move.
   
   **Expected behavior:** Reserve transaction-not-found for a definitive 
absence response. Propagate Meta Service/KV lookup failures as a 
distinguishable lookup/unknown-outcome error, preserving the underlying status. 
Callers should be able to retry lookup/settlement for the same transaction and 
label within their existing deadline, rather than infer that replay is safe.
   
   **Reproduction sketch (fault injection; not yet executed):**
   1. Start a cloud-mode Doris cluster and prepare a transaction on a 
disposable test table with a unique label.
   2. Inject a Meta Service `get_txn` response with `KV_TXN_GET_ERR` (for 
example a retryable KV read failure) while the FE performs the pre-commit 
transaction-state lookup. Keep the transaction record intact.
   3. Commit the same transaction and compare the FE lookup log with the client 
response. Current behavior reports missing transaction despite the lookup 
failure.
   4. Remove the fault and query the same transaction/label to determine its 
actual state. A control case with a definitively absent transaction should 
remain distinguishable from step 3.
   


-- 
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]

Reply via email to