-
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
bugfix: server restart not recover max sessionId on db mode #1850
Conversation
Signed-off-by: slievrly <slievrly@163.com>
Codecov Report
@@ Coverage Diff @@
## develop #1850 +/- ##
=============================================
- Coverage 55.34% 55.16% -0.19%
- Complexity 2376 2377 +1
=============================================
Files 422 422
Lines 14333 14392 +59
Branches 1719 1729 +10
=============================================
+ Hits 7933 7939 +6
- Misses 5656 5708 +52
- Partials 744 745 +1
|
core/src/main/java/io/seata/core/store/db/LogStoreDataBaseDAO.java
Outdated
Show resolved
Hide resolved
Signed-off-by: slievrly <slievrly@163.com>
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
public void reload() { | ||
long maxSessionId = transactionStoreManager.getCurrentMaxSessionId(); | ||
if (maxSessionId > UUIDGenerator.getCurrentUUID()) { | ||
UUIDGenerator.setUUID(UUIDGenerator.getCurrentUUID(), maxSessionId + 1); |
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.
no need to add 1
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.
fixed
Signed-off-by: slievrly <slievrly@163.com>
Signed-off-by: slievrly <slievrly@163.com>
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
Signed-off-by: slievrly slievrly@163.com
Ⅰ. Describe what this PR did
bugfix: server restart not recover max sessionId on db mode
Ⅱ. Does this pull request fix one issue?
fix #1851
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews