You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "biedongbin (via GitHub)" <gi...@apache.org> on 2026/02/25 06:05:37 UTC

[PR] feature: add action status report for SAGA annotation mode [incubator-seata]

biedongbin opened a new pull request, #8001:
URL: https://github.com/apache/incubator-seata/pull/8001

   Add action status report mechanism to handle empty compensation and suspension issues in SAGA annotation mode.
   
   Changes:
   - Add configuration key CLIENT_SAGA_ACTION_STATUS_REPORT_ENABLE (default false)
   - Add action status constants: ACTION_STATUS, ACTION_STATUS_SUCCESS, ACTION_STATUS_FAILED
   - Add getActionStatus/setActionStatus methods in BusinessActionContext
   - Report action status (success/failed) after prepare method execution in non-CommonFence mode
   - Add Hook invocation before/after compensation in SagaAnnotationResourceManager
   
   Business layer can implement TccHook interface and read actionStatus in beforeTccRollback() to decide compensation behavior.
   
   Tests:
   - Add comprehensive unit tests for BusinessActionContext action status methods
   - Test coverage: 7 test cases, all passed
   
   Related: #7840
   
   <!--
       Licensed to the Apache Software Foundation (ASF) under one or more
       contributor license agreements.  See the NOTICE file distributed with
       this work for additional information regarding copyright ownership.
       The ASF licenses this file to You under the Apache License, Version 2.0
       (the "License"); you may not use this file except in compliance with
       the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
       
       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.
   -->
   <!-- Please make sure you have read and understood the contributing guidelines -->
   
   - [ Y] I have read the [CONTRIBUTING.md](https://github.com/apache/incubator-seata/blob/2.x/CONTRIBUTING.md) guidelines.
   - [ Y] I have registered the PR [changes](https://github.com/apache/incubator-seata/tree/2.x/changes).
   
   ### Ⅰ. Describe what this PR did
   
   
   ### Ⅱ. Does this pull request fix one issue?
   <!-- If that, add "fixes #xxx" below in the next line, for example, fixes #97. -->
   fixes #7840 
   
   ### Ⅲ. Why don't you add test cases (unit test/integration test)? 
   
   
   ### Ⅳ. Describe how to verify it
   
   
   ### Ⅴ. Special notes for reviews
   
   


-- 
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: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] feature: add action status report for SAGA annotation mode [incubator-seata]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #8001:
URL: https://github.com/apache/incubator-seata/pull/8001#issuecomment-4088460843

   ## [Codecov](https://app.codecov.io/gh/apache/incubator-seata/pull/8001?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `23.63636%` with `42 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 72.23%. Comparing base ([`a63866f`](https://app.codecov.io/gh/apache/incubator-seata/commit/a63866fcea40885cd318984207999f367813a4d5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`fbed0b4`](https://app.codecov.io/gh/apache/incubator-seata/commit/fbed0b446610049b49d97c79ae45758838c6a16a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/incubator-seata/pull/8001?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...e/seata/saga/rm/SagaAnnotationResourceManager.java](https://app.codecov.io/gh/apache/incubator-seata/pull/8001?src=pr&el=tree&filepath=saga%2Fseata-saga-annotation%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fsaga%2Frm%2FSagaAnnotationResourceManager.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2FnYS9zZWF0YS1zYWdhLWFubm90YXRpb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlYXRhL3NhZ2Evcm0vU2FnYUFubm90YXRpb25SZXNvdXJjZU1hbmFnZXIuamF2YQ==) | 0.00% | [24 Missing :warning: ](https://app.codecov.io/gh/apache/incubator-seata/pull/8001?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...n/tx/api/interceptor/ActionInterceptorHandler.java](https://app.codecov.io/gh/apache/incubator-seata/pull/8001?src=pr&el=tree&filepath=integration-tx-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fintegration%2Ftx%2Fapi%2Finterceptor%2FActionInterceptorHandler.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW50ZWdyYXRpb24tdHgtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9pbnRlZ3JhdGlvbi90eC9hcGkvaW50ZXJjZXB0b3IvQWN0aW9uSW50ZXJjZXB0b3JIYW5kbGVyLmphdmE=) | 25.00% | [16 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/incubator-seata/pull/8001?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##                2.x    #8001      +/-   ##
   ============================================
   - Coverage     72.24%   72.23%   -0.02%     
   - Complexity      876      877       +1     
   ============================================
     Files          1310     1310              
     Lines         49977    50030      +53     
     Branches       5945     5953       +8     
   ============================================
   + Hits          36107    36139      +32     
   - Misses        10917    10942      +25     
   + Partials       2953     2949       -4     
   ```
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/incubator-seata/pull/8001?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...ava/org/apache/seata/common/ConfigurationKeys.java](https://app.codecov.io/gh/apache/incubator-seata/pull/8001?src=pr&el=tree&filepath=common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fcommon%2FConfigurationKeys.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9jb21tb24vQ29uZmlndXJhdGlvbktleXMuamF2YQ==) | `0.00% <ø> (ø)` | |
   | [...c/main/java/org/apache/seata/common/Constants.java](https://app.codecov.io/gh/apache/incubator-seata/pull/8001?src=pr&el=tree&filepath=common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fcommon%2FConstants.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9jb21tb24vQ29uc3RhbnRzLmphdmE=) | `100.00% <ø> (ø)` | |
   | [...apache/seata/rm/tcc/api/BusinessActionContext.java](https://app.codecov.io/gh/apache/incubator-seata/pull/8001?src=pr&el=tree&filepath=integration-tx-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Frm%2Ftcc%2Fapi%2FBusinessActionContext.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW50ZWdyYXRpb24tdHgtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9ybS90Y2MvYXBpL0J1c2luZXNzQWN0aW9uQ29udGV4dC5qYXZh) | `60.31% <100.00%> (+4.96%)` | :arrow_up: |
   | [...n/tx/api/interceptor/ActionInterceptorHandler.java](https://app.codecov.io/gh/apache/incubator-seata/pull/8001?src=pr&el=tree&filepath=integration-tx-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fintegration%2Ftx%2Fapi%2Finterceptor%2FActionInterceptorHandler.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW50ZWdyYXRpb24tdHgtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9pbnRlZ3JhdGlvbi90eC9hcGkvaW50ZXJjZXB0b3IvQWN0aW9uSW50ZXJjZXB0b3JIYW5kbGVyLmphdmE=) | `64.51% <25.00%> (-9.75%)` | :arrow_down: |
   | [...e/seata/saga/rm/SagaAnnotationResourceManager.java](https://app.codecov.io/gh/apache/incubator-seata/pull/8001?src=pr&el=tree&filepath=saga%2Fseata-saga-annotation%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fsaga%2Frm%2FSagaAnnotationResourceManager.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2FnYS9zZWF0YS1zYWdhLWFubm90YXRpb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlYXRhL3NhZ2Evcm0vU2FnYUFubm90YXRpb25SZXNvdXJjZU1hbmFnZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   
   ... and [8 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-seata/pull/8001/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/incubator-seata/pull/8001/graphs/tree.svg?width=650&height=150&src=pr&token=tbmHt2ZfxO&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/incubator-seata/pull/8001?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] feature: add action status report for SAGA annotation mode [incubator-seata]

Posted by "biedongbin (via GitHub)" <gi...@apache.org>.
biedongbin closed pull request #8001: feature: add action status report for SAGA annotation mode
URL: https://github.com/apache/incubator-seata/pull/8001


-- 
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: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org