[SERVER-25622] system.views should not appear in listCollections Created: 15/Aug/16  Updated: 20/Aug/16  Resolved: 18/Aug/16

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kyle Suarez Assignee: Kyle Suarez
Resolution: Won't Fix Votes: 0
Labels: read-only-views
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by TOOLS-1256 Tools have to know not to backup/copy... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Integration 2016-08-29
Participants:

 Description   

The system.views collection should be omitted from listCollections output as we don't want external users interacting with it whatsoever.



 Comments   
Comment by Kyle Suarez [ 18/Aug/16 ]

In SERVER-24506, it was decided that initial sync would simply clone the system.views collection. This means that omitting system.views from listCollections would break initial sync.

Per an offline conversation with zach.snow, the tools team will take a different approach and treat system collections specially. Therefore, I'm closing this ticket as won't fix.

Comment by Andy Schwerin [ 17/Aug/16 ]

The other collections only exist on the admin database, anymore. They show up in listCollections, though, when present.

Comment by Kyle Suarez [ 16/Aug/16 ]

On a recent version of master, I ran a createView, and then listed the collections. I only see system.indexes and system.views, none of the admin collections:

> show collections
system.indexes
system.views
view
> db.runCommand( { listCollections: 1 } )
{
        "cursor" : {
                "id" : NumberLong(0),
                "ns" : "test.$cmd.listCollections",
                "firstBatch" : [
                        {
                                "name" : "system.indexes",
                                "type" : "collection",
                                "options" : {
 
                                },
                                "info" : {
                                        "readOnly" : false
                                }
                        },
                        {
                                "name" : "system.views",
                                "type" : "collection",
                                "options" : {
 
                                },
                                "info" : {
                                        "readOnly" : false
                                }
                        },
                        {
                                "name" : "view",
                                "type" : "view",
                                "options" : {
                                        "viewOn" : "coll",
                                        "pipeline" : [ ]
                                },
                                "info" : {
                                        "readOnly" : true
                                }
                        }
                ]
        },
        "ok" : 1
}

Comment by Andy Schwerin [ 16/Aug/16 ]

Does system.indexes appear on mmap? What about admin.system.version, admin.system.users and admin.system.roles?

Generated at Thu Feb 08 04:09:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.