Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-74313

Prevent "invalid view definition" error during AutoGetCollection for a non-existing collection

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: