-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](routine-load) add lock to avoid editlog out of order when concurrent update job #31095
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
Conversation
|
Thank you for your contribution to Apache Doris. |
|
run buildall |
fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadManager.java
Outdated
Show resolved
Hide resolved
|
run buildall |
dataroaring
left a comment
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
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
|
run buildall |
liaoxin01
left a comment
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
|
PR approved by at least one committer and no changes requested. |
dataroaring
left a comment
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
PR Run Status
PR Analysis
PR Feedback
Code feedbackfile: fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadManager.java
|
Bug
When replay journal, FE meets NullPointerException and crash.
Why this happened
It may cause the editLog out of order in the following scenarios:
thread A: create job and record job meta
thread B: change job state and persist in editlog according to meta
thread A: persist in editlog
which will cause the null pointer exception when replaying editLog
How to solve this problem in this pr
Use the lock to make sure the record meta in memory and write editlog is atomicity, when pausing or stopping the job, these two states must be completed simultaneously when the job is visible.