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
Rename success with writableResult and update final writableResult about wait writeSet #3505
Conversation
ping @dlg99 @hangc0276 @shoothzj @eolivelli @StevenLuMT PTAL. Thanks. |
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! Maybe we need to add a unit test?
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
Outdated
Show resolved
Hide resolved
@zymap I have add a unit test. PTAL. Thanks. |
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.
Are you only renaming a variable?
I think that adding a test is the maim content of this patch. Maybe we should change the title
@eolivelli Thanks for your comments.
No, I updated the title.
The code before this PR is like this: while (!isWriteSetWritable(writeSet, allowedNonWritableCount)) {
...
} The code after this PR is this: while (!(writableResult = isWriteSetWritable(writeSet, allowedNonWritableCount))) {
...
} writableResult will not update the last result, but this result needs to be used later, we should update it. |
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
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/SlowBookieTest.java
Outdated
Show resolved
Hide resolved
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.
Sorry for another minor comment. I just want to make sure the test can not be passed without this change.
I copied this test and run it locally, and it passed. I left a comment about how to fix it. PTAL. :)
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/SlowBookieTest.java
Outdated
Show resolved
Hide resolved
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/SlowBookieTest.java
Outdated
Show resolved
Hide resolved
…lowBookieTest.java Co-authored-by: Yong Zhang <zhangyong1025.zy@gmail.com>
…lowBookieTest.java Co-authored-by: Yong Zhang <zhangyong1025.zy@gmail.com>
@zymap Good. Thanks for your comments. I have committed it. PTAL. |
@zymap All tests passed. Can this pr be merged? Thanks. |
…out wait writeSet (apache#3505) ### Changes update `success` about wait writeSet for Writable result. (cherry picked from commit 2e1a2f0)
…out wait writeSet (apache#3505) ### Changes update `success` about wait writeSet for Writable result. (cherry picked from commit 2e1a2f0)
…out wait writeSet (apache#3505) ### Changes update `success` about wait writeSet for Writable result. (cherry picked from commit 2e1a2f0) (cherry picked from commit 969bfc8)
Changes
update
success
about wait writeSet for Writable result.