TheĀ ShardServerCatalogCacheLoader doesn't interrupt ongoing operations on step up as opposed to on step down. This could lead us to a deadlock (with timeout): if a node is a secondary node at this point but afterwards it is elected as primary, it might end up issuing a _flushRoutingTableCacheUpdates against itself. This could lead us to a deadlock if the current refresh was coming from the RecoverRefreshThread: the issued _flushRoutingTableCacheUpdates comand will end up waiting until the current refresh is completed but the current refresh cannot be completed because it is waiting for the completion of the _flushRoutingTableCacheUpdates command.
- related to
-
SERVER-45646 If a filtering metadata refresh is scheduled while a node is secondary and there is no primary, then the node becomes primary, the refresh can deadlock with itself
- Closed