XiaoFeiASK opened a new pull request, #1164:
URL: https://github.com/apache/incubator-seata-go/pull/1164

   - [ ] I have registered the PR changes.
   
   ## **What this PR does:**
   
   1. Fixes error handling in RM branch commit and rollback processors. When 
`BranchCommit` or `BranchRollback` returns an error, the processor sends a 
failure response to TC instead of returning immediately and causing a timeout.
   2. Covers all four transport paths: Getty/gRPC × commit/rollback.
   3. Ensures the failure response contains `ResultCodeFailed`, the branch 
status, xid, branch ID and error message.
   4. Preserves both the business error and the response-sending error with 
`errors.Join` when `SendAsyncResponse` fails.
   5. Adds tests covering failure responses and combined business/transport 
errors.
   
   ## **Which issue(s) this PR fixes:**
   
   Fixes #1156
   
   ## **Special notes for your reviewer:**
   
   Previously, the processor returned the RM business error before sending the 
branch result response. This could cause TC to wait until the request timed 
out. The new implementation sends the protocol-level failure response first and 
returns an error only when response delivery fails.
   
   The tests cover all Getty/gRPC commit and rollback paths, including xid, 
branch ID, branch status, result code, error message and combined error 
handling.
   
   ## **Does this PR introduce a user-facing change?:**
   ```release-note
   NONE


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