- Reference >
- Database Commands >
- Sharding Commands >
- flushRouterConfig
flushRouterConfig¶
On this page
-
flushRouterConfig¶ flushRouterConfigclears the cached routing table. Use this command to force a refresh of the routing table cache. In most cases, this happens automatically. You should only need to runflushRouterConfigaftermovePrimaryhas been run or after manually clearing thejumbochunk flag.Starting in MongoDB 4.0.6 (and 3.6.11),
flushRouterConfigis available on bothmongosinstances andmongodinstances and can:Flush the cache for a specified collection when passed in a collection namespace parameter:
Flush the cache for a specified database and its collections when passed in a database namespace parameter:
Flush the cache for all databases and their collections when run without a parameter or passed in a non-string scalar value (e.g.
1):
In MongoDB 4.0.5 and earlier (and 3.6.10 and earlier),
flushRouterConfigis only available formongosinstances and can flush the cache for all databases and their collections:
Considerations¶
You should only need to run flushRouterConfig after
movePrimary has been run or after manually clearing the
jumbo chunk flag.