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

TAC模式读已提交的隔离级别bug修复 #364

Merged
merged 3 commits into from
Aug 25, 2023
Merged

Conversation

zkyoma
Copy link
Contributor

@zkyoma zkyoma commented Aug 15, 2023

Make sure that:

  • You have read the contribution guidelines.
  • You submit test cases (unit or integration tests) that back your changes.
  • Your local test passed mvn clean install -Dmaven.javadoc.skip=true.

for issue #363

@codecov-commenter
Copy link

Codecov Report

Merging #364 (f86198d) into master (339313e) will not change coverage.
The diff coverage is 0.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@          Coverage Diff           @@
##           master    #364   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files         442     443    +1     
  Lines        8621    8659   +38     
  Branches     1417    1421    +4     
======================================
- Misses       8621    8659   +38     
Files Changed Coverage Δ
...g/dromara/hmily/config/api/entity/HmilyConfig.java 0.00% <0.00%> (ø)
.../dromara/hmily/tac/core/lock/HmilyLockManager.java 0.00% <0.00%> (ø)
...omara/hmily/tac/core/lock/LockRetryController.java 0.00% <0.00%> (ø)
...hmily/tac/p6spy/executor/HmilyExecuteTemplate.java 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

*/
String makePaymentWithReadCommitted(Order order);
String makePaymentWithReadCommitted(Order order, int type);
Copy link
Contributor

Choose a reason for hiding this comment

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

type 的含义不明确,代码中避免直接用1,2进行区分,建议使用enum

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的

@Getter
public enum ReadCommittedTransactionEnum {

READ_COMMITTED_TRANSACTION_ALL(1, "读已提交隔离级别的事务, 包括更新、查询操作"),
Copy link
Contributor

Choose a reason for hiding this comment

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

建议替换为TRANSACTION_READ_WRITE

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改


READ_COMMITTED_TRANSACTION_ALL(1, "读已提交隔离级别的事务, 包括更新、查询操作"),

READ_COMMITTED_TRANSACTION_JUST_SELECT(2, "读已提交隔离级别的事务, 只有查询操作");
Copy link
Contributor

Choose a reason for hiding this comment

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

建议替换为TRANSACTION_READ_ONLY

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

@cherrylzhao cherrylzhao merged commit efca5b5 into dromara:master Aug 25, 2023
1 check passed
@zkyoma zkyoma deleted the 363 branch August 25, 2023 03:46
cherrylzhao pushed a commit that referenced this pull request Oct 24, 2023
* TAC模式读已提交的隔离级别bug修复, 读隔离查询时只需要检查全局锁, 增加重试机制, 修改对应的测试demo。

* 优化tac demo代码, 使用enum代替int值来区分代码逻辑

* 优化tac demo中enum的命名
cherrylzhao pushed a commit that referenced this pull request Oct 24, 2023
* TAC模式读已提交的隔离级别bug修复, 读隔离查询时只需要检查全局锁, 增加重试机制, 修改对应的测试demo。

* 优化tac demo代码, 使用enum代替int值来区分代码逻辑

* 优化tac demo中enum的命名
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants