Resolving Version Discrepancies In Canisters

We recently discovered that, due to oversight, some of our canisters are running on different versions (not the latest). Unfortunately, this has created a situation where these canisters lack the latest module. There are around 1k+ canisters which are using different module hash (which are not latest module hash). we currently do not maintain a version-to-module hash mapping on our canisters.

Given this scenario, how to best handle this situation without risking data loss, particularly in the heap memory. Our primary objective is to bring all canisters to the latest version seamlessly.

Below is the snippet showing number of canisters and the module hash they are on. Our latest module hash is 1b2e5f31358b014c1dedae9d03371478c79abf514977335254349e65b5f23342

@ulan @dsarlis any thoughts around this?