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

Drop system.views when the last view is removed

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing

      Currently system.views stays around even after the last view is dropped. This can result in confusion behavior like the following:

      1. Create a collection "stuff" in db "foo".
      2. Add a view on "stuff" called "stuffview" (in db "foo").
      3. Delete that view and its underlying collection.

      OBSERVE: foo.system.views still exists, although it's empty.

      4. Try to recreate the collection from step 1 but on db "Foo". (Note the case difference.)

      OBSERVE: This fails with DatabaseDifferCase.
      EXPECTED: There's no content in db "foo", so it shouldn't prevent our creating db "Foo".

            Assignee:
            Unassigned Unassigned
            Reporter:
            felipe.gasper@mongodb.com Felipe Gasper
            Votes:
            4 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: