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

Change LockMode from MEMORY to DB when the StoreMode is DB #1145

Merged
merged 9 commits into from
Jun 5, 2019

Conversation

zhangthen
Copy link
Contributor

Ⅰ. Describe what this PR did

If the StoreMode is 'DB' and the LockMode is 'MEMORY', the locks in 'MEMORY' cann't be released normally after the transaction commit or rollback.

Ⅱ. Does this pull request fix one issue?

Change LockMode from MEMORY to DB automatically when the StoreMode is DB .

@zhangthen zhangthen requested a review from slievrly May 31, 2019 11:00
@codecov-io
Copy link

codecov-io commented May 31, 2019

Codecov Report

Merging #1145 into develop will decrease coverage by 0.01%.
The diff coverage is 33.33%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1145      +/-   ##
=============================================
- Coverage       41.9%   41.88%   -0.02%     
  Complexity      1372     1372              
=============================================
  Files            245      245              
  Lines          10188    10194       +6     
  Branches        1332     1334       +2     
=============================================
+ Hits            4269     4270       +1     
- Misses          5364     5367       +3     
- Partials         555      557       +2
Impacted Files Coverage Δ Complexity Δ
.../main/java/io/seata/server/lock/LockerFactory.java 37.03% <33.33%> (-1.06%) 3 <2> (ø)
...server/store/file/FileTransactionStoreManager.java 45.64% <0%> (-0.35%) 19% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd5355e...2fe89e8. Read the comment docs.

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

if startup in file mode and use db lock ,can it work?

String lockMode = CONFIG.getConfig(ConfigurationKeys.LOCK_MODE);
//storeMode == db and lockMode == memeory is not allowed
Copy link
Contributor

Choose a reason for hiding this comment

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

can we remove the settings of lock mode, only one setting: "storeMode"?

@zhangthen zhangthen merged commit 2a528dc into apache:develop Jun 5, 2019
@leizhiyuan leizhiyuan added this to the 0.7.0 milestone Jul 10, 2019
nick-tan pushed a commit to nick-tan/seata that referenced this pull request Jul 12, 2019
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.

None yet

5 participants