[SERVER-30928] Add a fixture for testing rollback on top of ReplSetTest Created: 01/Sep/17 Updated: 30/Oct/23 Resolved: 18/Sep/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Testing Infrastructure |
| Affects Version/s: | 3.5.12 |
| Fix Version/s: | 3.6.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Robert Guo (Inactive) | Assignee: | Robert Guo (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | TIG 2017-09-11, TIG 2017-10-02 |
| Participants: |
| Description |
|
Many of our rollback javascript tests follow the same pattern of setting up a replica set, doing some operations, change the replica set configuration to induce rollback, do more operations that will be rolled back, check that the replica set is in a consistent state after rolling back. A lot of work goes into the template code to set up the cluster and trigger a roll back, so we should provide a unified interface that allows the user to define n operations of which the first k will be persisted and the last n-k will be rolled back. This should make it significantly easier to add new rollback tests and to increase our test coverage of rollback. The existing tests should also be simplified to use the new rollback fixture. The RollbackFixture will wrap around a 3 node ReplSetTest with 1 arbiter, which is the setup used by all existing rollback JS tests. It will expose the following functions to the user:
Internally it will keep track of the state of the replicaset with the following states: TRANSITIONING, STOPPED, ROLLBACK, NORMAL These set of functions should be sufficient for handling the rollback logic for the majority of rollback tests, but more complicated scenarios that require a specific sequence of partitions or more than 3 nodes in a replica set e.g. double_rollback.js will not be able to use this fixture for the time being. |
| Comments |
| Comment by Githook User [ 18/Sep/17 ] |
|
Author: {'username': 'guoyr', 'name': 'Robert Guo', 'email': 'robert.guo@10gen.com'}Message: |