Skip to content
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

upgrade: Upgrade nuraft to 2.1.0 #307

Merged
merged 2 commits into from
Nov 13, 2024
Merged

Conversation

maurermi
Copy link
Collaborator

Upgrades NuRaft to v2.1.0.

This upgrade caused a failing assertion in the raft_node_test_non_blocking unit test. I claim that this assertion in the non_blocking test was actually misguided, and as written, should have always failed in the non_blocking context (or more accurately, the assertion gave insufficient information about whether the task completed correctly).

This test fails because when getting the result code of a replication which is asynchronous, if the result has not been written yet, the return value is not cmd_result_code::OK (it becomes cmd_result_code::RESULT_NOT_EXIST_YET). In the non-blocking context, this should not prompt a failure, specifically with node::replicate_sync written as it is currently. The reason this does not fail with v1.3 is because cmd_result_code::RESULT_NOT_EXIST_YET did not exist, and get_result_code() returned the default value of cmd_result_code, which appeared to be cmd_result_code::OK.

Would appreciate feedback about whether we should re-write replicate_sync to be blocking in a non-blocking node, and wait to see if the result code is truly OK before proceeding. It does not seem like this has been the case to this point (but I have a hunch that it should be), but happy to be wrong on this point. This change is not included in this PR at the time of writing.

@maurermi
Copy link
Collaborator Author

@HalosGhost would be great to get your opinion in particular on what to do about replicate_sync

@maurermi maurermi marked this pull request as ready for review October 30, 2024 13:44
@maurermi
Copy link
Collaborator Author

Bumping this out of draft

Also repairs an assumption made by a unit test

Signed-off-by: Michael Maurer <[email protected]>
@maurermi
Copy link
Collaborator Author

maurermi commented Nov 4, 2024

Unfortunately, I believe that the failing CI test is related to the image that test is run against, which is based on trunk. As a dependency was updated in this PR, that will continue to fail.

Copy link
Collaborator

@HalosGhost HalosGhost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t-ACK; this is a really simple modification to handle updating our NuRaft dependency to 2.1.0.

@HalosGhost HalosGhost merged commit 81b99ac into mit-dci:trunk Nov 13, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants