-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Catalog and Routing
Currently, AutoGetCollection for an unknown namespace will fail with InvalidView even if there is no view for the namespace we are looking up. In a sharded collection, this means that commands sent to shards that do not know about a collection will fail for this reason.
SERVER-73984 aims to make setAllowMigrations send flushRoutingTableCacheUpdates to all shards (even if they don't have chunks for the collection). With the current AutoGetCollection behavior, this would mean that in a database with an invalid view, all ddl operations in that database would fail with InvalidView even when the ddl operation has nothing to do with the invalid view.
If possible, we should implement something similar to SERVER-42373 to allow AutoGetCollection to succeed if the namespace is not a view.
Currently, we are working around this in places where it could cause issues. However, this prevents us from using the AutoGetCollection API in certain places until we fix this issue.
- related to
-
SERVER-72673 Investigate if it's ok to ignore errors on reload views for a database from the system.views collection.
- Closed