-
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: eliminate the impact of instructions reordering on session async committing task #1576
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1576 +/- ##
=============================================
+ Coverage 47.08% 47.25% +0.17%
Complexity 1764 1764
=============================================
Files 359 359
Lines 12971 12999 +28
Branches 1579 1617 +38
=============================================
+ Hits 6107 6143 +36
- Misses 6187 6191 +4
+ Partials 677 665 -12
Continue to review full report at Codecov.
|
…ync committing task
75e9b4e
to
94e0272
Compare
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.
LGTM
Ⅰ. Describe what this PR did
After code analysis, I found there may be instructions reordering in
DefaultCore#asyncCommit
. Session object may be added to async committing session manager first, beforeglobalSession.addSessionLifecycleListener
andglobalSession.changeStatus
. The reason is thatGlobalSession#lifecycleListeners
andDefaultSessionManager#sessionMap
have no dependency to each other.I think, unexpected scheduling delay of async committing job and instructions reordering lead to the situation happened in #1564.
The analysis of one error log:
AsyncCommitting
until afterDefaultCore#doGlobalCommit#endCommitted
, session object still be in session manager. One AsyncCommitting event was posted here.This PR only add a session status check, any better idea?
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews