bookkeeper icon indicating copy to clipboard operation
bookkeeper copied to clipboard

Rename success with writableResult and update final writableResult about wait writeSet

Open wenbingshen opened this issue 2 years ago • 3 comments

Changes

update success about wait writeSet for Writable result.

wenbingshen avatar Sep 26 '22 17:09 wenbingshen

ping @dlg99 @hangc0276 @Shoothzj @eolivelli @StevenLuMT PTAL. Thanks.

wenbingshen avatar Sep 26 '22 17:09 wenbingshen

Great! Maybe we need to add a unit test?

@zymap I have add a unit test. PTAL. Thanks.

wenbingshen avatar Sep 27 '22 08:09 wenbingshen

@eolivelli Thanks for your comments.

Are you only renaming a variable?

No, I updated the title.

I think that adding a test is the maim content of this patch. Maybe we should change 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.

wenbingshen avatar Sep 27 '22 09:09 wenbingshen

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. :)

@zymap Good. Thanks for your comments. I have committed it. PTAL.

wenbingshen avatar Oct 18 '22 11:10 wenbingshen

@zymap All tests passed. Can this pr be merged? Thanks.

wenbingshen avatar Oct 19 '22 04:10 wenbingshen