Previously, resharding operations were aborted after sending the request to finalize the FCV version on the shards when upgrading, making it is possible that a resharding recipient will update its FCV to its target value prior to aborting. It was therefore not possible to differentiate a resharding operation that has upgraded to the latest version since starting from one that has been the latest version throughout. For this reason, the resharding operations are now aborted first. Furthermore, the resharding command currently ensures that the FCV cannot change while setting up the coordinator. However, it did not check to make sure that the current FCV is not currently in an upgrading or downgrading state. After making the above change, this would allow for the possibility for a new resharding operation to begin during an FCV upgrade, after resharding operations are aborted, but before the shards complete the FCV upgrade. This would have the consequence of the operation running across FCVs without being aborted. As such, the reshard command now fails if the current FCV is either upgrading or downgrading. These changes in combination should guarantee that during a version change, a new resharding operation cannot begin and a previously running resharding operation always aborts completely before reaching the target version. Note that it is still possible for a resharding operation to reach an upgrading or downgrading FCV before being aborted. These changes were made in the interest of being able to assert that newly added optional fields that should always be set were indeed set. As such, this change also enables the assertion disabled by SERVER-65039.
4.7 KiB
4.7 KiB