[SERVER-50758] Investigate FCV code for opportunities to refactor Created: 03/Sep/20 Updated: 21/Oct/20 Resolved: 21/Oct/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication, Upgrade/Downgrade |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Jason Chan | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Sprint: | Repl 2020-09-21, Repl 2020-10-05, Repl 2020-10-19, Repl 2020-11-02 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
As Replication will be owning the upgrade/downgrade process moving forward and with the introduction of new generic FCV helpers, we should investigate the FCV code for opportunities of better design. An example would be to investigate whether we can implement a better state machine design for FCV. |
| Comments |
| Comment by A. Jesse Jiryu Davis [ 29/Sep/20 ] |
|
Note to self: a new shard to be able to transition from the “last-lts” to “last-continuous” FCV only when a config server is calling setFCV ( |
| Comment by Jason Chan [ 17/Sep/20 ] |
|
We should look into further future-proofing the validateUpgradeRequest and validateDowngradeRequest functions in set_feature_compatibility_version_command.cpp which currently makes the assumption that requestedVersion will always be a valid FCV. Since we are only removing FCV constants from the codebase after the next LTS release, the server will eventually be aware of FCVs other than the last-lts, last-continuous, and latest versions. We should restructure the code in a way so that we are more explicit in checking that 'requestedVersion' is a valid FCV state. Edit: This may not be necessary since we parse setFCV command object using the parseVersion function which will validate that the available values are one of last-lts, last-continuous, latest. |