Details
-
Task
-
Resolution: Gone away
-
Major - P3
-
None
-
None
-
None
-
Fully Compatible
Description
Move this retry do-while loop into MetadataLoader. ShardingState should not need to know that RemoteChangeDetected errors should be retried, MetadataLoader should just do it.
This will also become important when the flow of operations in shard chunk metadata refresh becomes more complicated as part of the safe secondary reads project. Specifically, we will need to load the locally persisted chunk metadata before trying to refresh from the config server, say. This logic should not be handled by ShardingState, but rather the MetadataLoader.
Create a MetadataLoader::refresh function that will have a retry loop around MetadataLoader::makeCollectionMetadata.