Roll out the service in phases to minimze disruptions
For rolling out this service, we will want to take a careful measured approach, as well as reduce disruptions to users where possible. To this end, we will have multi-phased rollout of the service.
For the staging instance, we will want to make sure that the emails are always disabled. Staging will not have accurate data, and represents outdated/duplicate data of production and would cause incorrect or duplicated emails to go out, which is not a state we want to be in.
For production, we will want to ensure that to begin with we will have the emails disabled for the warning task. This will give us a database of users that will receive messages, and allow us to check the integrity of the data and prepare. Once that is done, we will clear that database and enable the emails. To give time for initial users to act on the emails, we will wait for 1-2 weeks at this point. Once that period has elapsed, we will take a snapshot of the user documents table and enable the removal. If there is an issue with that process, we will use the before mentioned snapshot to revert the data and disable the expiration task once more.