Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: fix the logic of rollback to savepoint and release to savepoint #3413

Merged
merged 19 commits into from Jan 6, 2021

Conversation

caohdgege
Copy link
Contributor

@caohdgege caohdgege commented Dec 27, 2020

Ⅰ. Describe what this PR did

修复 ConnectionProxy#rollback(savepoint) 和 ConnectionProxy#releaseSavepoint(savepoint) 的逻辑

把 undo_item/lock_key 和savepoint关联起来,然后rollback(savepoint)的时候,把savepoint对应的undo_item&lock_key的buffer清理掉,releaseSavepoint(savepoint)的时候,就把对应的undo_item&lock_key挪到上一个savepoint上。

Ⅱ. Does this pull request fix one issue?

fixes #3223

Ⅲ. Why don't you add test cases (unit test/integration test)?

困了。。。明天再补吧。。。

Ⅳ. Describe how to verify it

手写jdbc去开启事务,回滚到savepoint/releaseSavepoint?

Ⅴ. Special notes for reviews

@codecov-io
Copy link

codecov-io commented Dec 27, 2020

Codecov Report

Merging #3413 (ec79157) into develop (9036e14) will increase coverage by 0.09%.
The diff coverage is 70.58%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3413      +/-   ##
=============================================
+ Coverage      51.47%   51.56%   +0.09%     
- Complexity      3351     3369      +18     
=============================================
  Files            617      617              
  Lines          20367    20419      +52     
  Branches        2549     2559      +10     
=============================================
+ Hits           10483    10529      +46     
- Misses          8830     8835       +5     
- Partials        1054     1055       +1     
Impacted Files Coverage Δ Complexity Δ
...o/seata/rm/datasource/AbstractConnectionProxy.java 12.08% <ø> (+0.74%) 5.00 <0.00> (ø)
...n/java/io/seata/rm/datasource/ConnectionProxy.java 25.17% <0.00%> (-2.38%) 13.00 <1.00> (ø)
...java/io/seata/rm/datasource/ConnectionContext.java 83.87% <87.03%> (+9.95%) 36.00 <18.00> (+17.00)
...ta/rm/datasource/exec/AbstractDMLBaseExecutor.java 59.61% <100.00%> (-0.77%) 11.00 <0.00> (ø)
...n/src/main/java/io/seata/common/util/IdWorker.java 83.33% <0.00%> (+6.25%) 12.00% <0.00%> (+1.00%)

Copy link
Contributor

@l81893521 l81893521 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@l81893521 l81893521 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the change to the 1.5.0.md in the path /change and /change/en-us

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@funky-eyes funky-eyes merged commit 5de6f40 into apache:develop Jan 6, 2021
@funky-eyes funky-eyes added this to the 1.5.0 milestone Jan 6, 2021
@funky-eyes funky-eyes added module/rm-datasource rm-datasource module type: bug Category issues or prs related to bug. labels Jan 6, 2021
@caohdgege caohdgege deleted the bugfix-rollback-savepoint branch February 8, 2021 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/rm-datasource rm-datasource module type: bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rollback(savepoint) in AbstractConnectionProxy work unexpected
4 participants