I have a StorageMap named PublicKeyToMsaId which has around 300K inserted items and I want to iterate on all of those keys-values in offchain-worker to create a reverse map in offchain storage.
To iterate I'm going to use PublicKeyToMsaId::iter() but by looking into the docs for iterator I can see the following
if you alter the map while doing this, you'll get undefined results.
Since I know that offchain-worker is running in a different thread, is it possible that when I'm iterating the map, an imported extrinsic might change some value on the map and the iterator on offchain-worker might end up in an undefined state?