Secondaries currently ping the primary to acquire the latest collection version, and then wait for that version to be seen on the op observer. Rather than doing this, we want functionality to get an optime from the primary and then have the secondary wait on that optime before continuing. In order to acquire the optime from the primary that includes the metadata persistence, we must ensure persistence has occurred before leaving: we must flush the ShardServerCatalogCacheLoader's task queue for that collection and then get the latest optime.
The flush design will probably take the form of attaching a Notification to the end of a ShardServerCatalogCacheLoader collection task list, and then signaling that Notification if present when the task is complete.
- has to be done before
-
SERVER-30148 Move force primary refresh functionality out of the ShardServerCatalogCacheLoader into the ShardingState's refresh logic
- Closed