I have noticed that when I upgrade my application containing a stateful service fabric will, as needed, promote old versions to primary to clear the path for upgrading a domain.
This ends up problematic when there is a non-backwards compatible release being pushed out. For instance, lets say my services query a database as they are promoted to primary. If I push an older release where a recently added database column is absent, the database roles back to that version and removes the column. Then during the upgrade fabric attempts to promote an old instance to primary, but that fails because the old instance is looking for the column that is no longer present in the database. This causes the whole upgrade to fail.
Is there anyway to upgrade the application but avoiding fabric promoting the current (pre deploy) version of my service to primary?