-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
refactor : separate the different storage pattern processing logic #2329
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2329 +/- ##
=============================================
- Coverage 51.80% 51.57% -0.24%
+ Complexity 2705 2665 -40
=============================================
Files 518 517 -1
Lines 16822 16781 -41
Branches 2033 1992 -41
=============================================
- Hits 8715 8655 -60
+ Misses 7293 7286 -7
- Partials 814 840 +26
|
/** | ||
* the lock manager | ||
*/ | ||
private static LockManager lockManager = EnhancedServiceLoader.load(LockManager.class, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uppercase static constants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review is ok:
1.LockerManagerFactory
2.locker: FileLocker, DBLocker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Test case passed.
- seata-sample passed.
server/src/main/java/io/seata/server/storage/db/lock/DataBaseLockManager.java
Outdated
Show resolved
Hide resolved
@@ -106,7 +111,7 @@ protected Locker getLocker() { | |||
* @return the locker | |||
*/ | |||
protected Locker getLocker(BranchSession branchSession) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not abstract method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
server/src/main/java/io/seata/server/storage/db/lock/DataBaseLockManager.java
Outdated
Show resolved
Hide resolved
…delete unnecessary attribute,because lock_key is always blank id db mode
@@ -79,7 +77,7 @@ public DataBaseSessionManager(String name) { | |||
|
|||
@Override | |||
public void init() { | |||
transactionStoreManager = EnhancedServiceLoader.load(TransactionStoreManager.class, StoreMode.DB.name()); | |||
transactionStoreManager = new DataBaseTransactionStoreManager(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be initialized 4 times by SessionHolder, it should be static.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.