You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "funky-eyes (via GitHub)" <gi...@apache.org> on 2024/11/15 07:49:13 UTC
[PR] bugfix: fix the two-phase concurrency issue during commit or rollback [incubator-seata]
funky-eyes opened a new pull request, #7005:
URL: https://github.com/apache/incubator-seata/pull/7005
<!-- Please make sure you have read and understood the contributing guidelines -->
- [ ] I have registered the PR [changes](../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. -->
### Ⅲ. 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] bugfix: fix the two-phase concurrency issue during commit or rollback [incubator-seata]
Posted by "slievrly (via GitHub)" <gi...@apache.org>.
slievrly commented on code in PR #7005:
URL: https://github.com/apache/incubator-seata/pull/7005#discussion_r1845494242
##########
server/src/main/java/org/apache/seata/server/coordinator/DefaultCore.java:
##########
@@ -308,65 +321,75 @@ public GlobalStatus rollback(String xid) throws TransactionException {
@Override
public boolean doGlobalRollback(GlobalSession globalSession, boolean retrying) throws TransactionException {
- boolean success = true;
- // start rollback event
- MetricsPublisher.postSessionDoingEvent(globalSession, retrying);
+ return SessionHolder.lockAndExecute(globalSession, () -> {
Review Comment:
Expect lock-free implementation to reduce code complexity and increase maintainability.
--
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] bugfix: fix the two-phase concurrency issue during commit or rollback [incubator-seata]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #7005:
URL: https://github.com/apache/incubator-seata/pull/7005#issuecomment-2478184707
## [Codecov](https://app.codecov.io/gh/apache/incubator-seata/pull/7005?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `52.06612%` with `58 lines` in your changes missing coverage. Please review.
> Project coverage is 52.61%. Comparing base [(`dbe095a`)](https://app.codecov.io/gh/apache/incubator-seata/commit/dbe095a39c9f751bcba293feee6234380d4bc58c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`03342b9`)](https://app.codecov.io/gh/apache/incubator-seata/commit/03342b93e07f353d1206988efc553f8e491803a4?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/7005?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...g/apache/seata/server/coordinator/DefaultCore.java](https://app.codecov.io/gh/apache/incubator-seata/pull/7005?src=pr&el=tree&filepath=server%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fserver%2Fcoordinator%2FDefaultCore.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9zZXJ2ZXIvY29vcmRpbmF0b3IvRGVmYXVsdENvcmUuamF2YQ==) | 57.00% | [25 Missing and 18 partials :warning: ](https://app.codecov.io/gh/apache/incubator-seata/pull/7005?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...aft/execute/branch/UpdateBranchSessionExecute.java](https://app.codecov.io/gh/apache/incubator-seata/pull/7005?src=pr&el=tree&filepath=server%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fserver%2Fcluster%2Fraft%2Fexecute%2Fbranch%2FUpdateBranchSessionExecute.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9zZXJ2ZXIvY2x1c3Rlci9yYWZ0L2V4ZWN1dGUvYnJhbmNoL1VwZGF0ZUJyYW5jaFNlc3Npb25FeGVjdXRlLmphdmE=) | 28.57% | [8 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/incubator-seata/pull/7005?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...er/raft/execute/lock/BranchReleaseLockExecute.java](https://app.codecov.io/gh/apache/incubator-seata/pull/7005?src=pr&el=tree&filepath=server%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fserver%2Fcluster%2Fraft%2Fexecute%2Flock%2FBranchReleaseLockExecute.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9zZXJ2ZXIvY2x1c3Rlci9yYWZ0L2V4ZWN1dGUvbG9jay9CcmFuY2hSZWxlYXNlTG9ja0V4ZWN1dGUuamF2YQ==) | 28.57% | [4 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/incubator-seata/pull/7005?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>
[](https://app.codecov.io/gh/apache/incubator-seata/pull/7005?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## 2.x #7005 +/- ##
============================================
- Coverage 52.61% 52.61% -0.01%
- Complexity 6579 6580 +1
============================================
Files 1126 1126
Lines 39928 39957 +29
Branches 4680 4688 +8
============================================
+ Hits 21010 21022 +12
- Misses 16916 16930 +14
- Partials 2002 2005 +3
```
| [Files with missing lines](https://app.codecov.io/gh/apache/incubator-seata/pull/7005?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...er/raft/execute/lock/BranchReleaseLockExecute.java](https://app.codecov.io/gh/apache/incubator-seata/pull/7005?src=pr&el=tree&filepath=server%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fserver%2Fcluster%2Fraft%2Fexecute%2Flock%2FBranchReleaseLockExecute.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9zZXJ2ZXIvY2x1c3Rlci9yYWZ0L2V4ZWN1dGUvbG9jay9CcmFuY2hSZWxlYXNlTG9ja0V4ZWN1dGUuamF2YQ==) | `40.00% <28.57%> (-15.56%)` | :arrow_down: |
| [...aft/execute/branch/UpdateBranchSessionExecute.java](https://app.codecov.io/gh/apache/incubator-seata/pull/7005?src=pr&el=tree&filepath=server%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fserver%2Fcluster%2Fraft%2Fexecute%2Fbranch%2FUpdateBranchSessionExecute.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9zZXJ2ZXIvY2x1c3Rlci9yYWZ0L2V4ZWN1dGUvYnJhbmNoL1VwZGF0ZUJyYW5jaFNlc3Npb25FeGVjdXRlLmphdmE=) | `45.45% <28.57%> (-34.55%)` | :arrow_down: |
| [...g/apache/seata/server/coordinator/DefaultCore.java](https://app.codecov.io/gh/apache/incubator-seata/pull/7005?src=pr&el=tree&filepath=server%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fserver%2Fcoordinator%2FDefaultCore.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9zZXJ2ZXIvY29vcmRpbmF0b3IvRGVmYXVsdENvcmUuamF2YQ==) | `53.47% <57.00%> (+1.77%)` | :arrow_up: |
... and [1 file with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-seata/pull/7005/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</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] bugfix: fix the Raft NPE issue caused by two-phase concurrency [incubator-seata]
Posted by "slievrly (via GitHub)" <gi...@apache.org>.
slievrly merged PR #7005:
URL: https://github.com/apache/incubator-seata/pull/7005
--
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