-
Notifications
You must be signed in to change notification settings - Fork 72
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
Tests for removing nodes without breaking riak_ensemble #593
Conversation
…semble_remove_node
Ensure that k/v ensembles reconfigure to exclude a leaving node before that node transitions to exiting status.
Add a wait_untiL_stable call right before the last read from the root ensemble.
This needs a rebase; one of the tests references rt_intercept_pt which exists on master but not on this branch. Running a rebased version causes a failure still, though:
|
ensemble_remove_node2 uses an intercept to prevent a riak_ensemble related transition that is necessary for nodes to completely exit and shutdown after removal. In fact, testing for this scenario is the entire point of this test, since it is testing logic that was added to solve basho/riak_core#572 and that logic prevents nodes from exiting until that transition occurs. However, even without this new logic, there is an unrelated riak_ensemble related bug that can trigger a race condition that also prevents nodes from shutting down. The good news is that other changes made as part of the solution to solve basho/riak_core#572 also fix this unrelated bug. Therefore this commit extends ensemble_remove_node2 to remove the intercept at the end of the test and verify that the removed nodes do actually end up exiting as expected. Thus, the test now tests for both the negative and positive scenarios and serves as a test against future regressions that stall node removal/shutdown.
This pull-request adds two new tests: As desired,
So, I've extended the test slightly in f822e52 to explicitly verify that the intercept used in the test is the reason why nodes are not exiting, rather than from the unrelated bug that previously existed on master. As extended, the test now fails against So, +1 on these tests. Although, please double check my changes to the test. Once the related pull-requests are reviewed/merged, these tests can be merged in. No need to rebase as @lordnull suggested as this pull-request merges cleanly and work just fine after merging. |
Finished reviewing complete feature change across all pull-requests. +1 to merge basho/riak_ensemble#19, basho/riak_core#578, and basho/riak_kv#926 FYI, looks like I forgot to assign myself to this issue when I first started this review ~2 weeks ago. Sorry for the duplicate effort @lordnull, but thanks for the extra pair of eyes. |
Test extension looks good @jtuple |
Tests for basho/riak_core#572