Open dianabarsan opened 3 years ago
After implementing the Nairobi replication protocol, achieving this becomes much easier because when syncing, we have an overview of every document that needs updating and we can choose which ones to prioritize.
I think the solution would be to always download changes for "important" documents first (settings, ddoc and service worker) and download the rest later.
This way we can make be more convinced that when a user gets the update popup, the upgrade was complete.
What feature do you want to improve? Currently, an upgrade of the webapp on a client consists of two events:
_design/medic-client
service-worker-meta
)A partial upgrade is a state where only one of these events have happened, with the second event happening in the (hopefully) near future. Being in a partially upgraded state can pose problems, for example, if the code (event 2) is updated and running before the ddoc, the code could be accessing new views, or generating data (tasks for example) using old view code. Theoretically, a plethora of issues could happen when the client is in this state.
Describe the improvement you'd like Figure out a way to package the upgrade in a single step.
Describe alternatives you've considered Leave it as it is.
Additional context We've recently received reports from production servers where there is proof (telemetry and feedback docs) that clients had downloaded the code, and ran this code, before downloading the ddoc. Example: https://github.com/medic/config-vhw/issues/48#issuecomment-854704181