-
Notifications
You must be signed in to change notification settings - Fork 963
Fix group ForceWrite not take effect with forceWriteMarkerSent in while loop of ForceWriteThread #3454
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
…equently forceWrite
StevenLuMT
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.
great job
|
@dlg99 @zymap @hangc0276 @eolivelli have a look,thanks |
eolivelli
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.
codelipenghui
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
Is it able to add a test to avoid the regression in the future?
| boolean shouldForceWrite = true; | ||
| int numReqInLastForceWrite = 0; | ||
| long busyStartTime = System.nanoTime(); | ||
| boolean forceWriteMarkerSent = false; |
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.
I think line:563 affects judgment @zymap
bookkeeper/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java
Line 563 in 149ecd9
| && forceWriteMarkerSent |
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.
Thanks. I got it
+1 |
hangc0276
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.
Nice catch!
dlg99
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, good catch.
Definitely needs a test.
|
@zymap @eolivelli this pr can be merged, |
…equently forceWrite (#3454) Fix group ForceWrite not take effect with forceWriteMarkerSent in while loop of ForceWriteThread ### Motivation Bookkeeper 4.15 has performance issue. There are too many journal sync. Then I found in ForceWriteThread, forceWriteMarkerSent is reset to false for every loop, and this can cause shouldForceWrite=true and trigger journal sync. This new logic is bringed by #2962 ### Changes move forceWriteMarkerSent=false out of while loop. (cherry picked from commit dcc9a41)
…equently forceWrite (apache#3454) Fix group ForceWrite not take effect with forceWriteMarkerSent in while loop of ForceWriteThread ### Motivation Bookkeeper 4.15 has performance issue. There are too many journal sync. Then I found in ForceWriteThread, forceWriteMarkerSent is reset to false for every loop, and this can cause shouldForceWrite=true and trigger journal sync. This new logic is bringed by apache#2962 ### Changes move forceWriteMarkerSent=false out of while loop.
Fix group ForceWrite not take effect with forceWriteMarkerSent in while loop of ForceWriteThread
Motivation
Bookkeeper 4.15 has performance issue. There are too many journal sync.
Then I found in ForceWriteThread, forceWriteMarkerSent is reset to false for every loop, and this can cause shouldForceWrite=true and trigger journal sync. This new logic is bringed by #2962
Changes
move forceWriteMarkerSent=false out of while loop.