[SERVER-34244] listCollections should support a nameOnly option Created: 30/Mar/18 Updated: 29/Oct/23 Resolved: 11/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Catalog, Storage |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.4 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Geert Bosch | Assignee: | Xiangyu Yao (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Storage NYC 2018-04-23 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
Currently the listCollections command needs to lock all collections to return their information. However, often only names are necessary. So, improve the listCollections command to support a nameOnly option like listDatabases and only require a MODE_IS lock on the database for that command. |
| Comments |
| Comment by Githook User [ 12/Apr/18 ] |
|
Author: {'email': 'xiangyu.yao@mongodb.com', 'name': 'Xiangyu Yao', 'username': 'xy24'}Message: |
| Comment by Githook User [ 11/Apr/18 ] |
|
Author: {'email': 'xiangyu.yao@mongodb.com', 'name': 'Xiangyu Yao', 'username': 'xy24'}Message: |
| Comment by Xiangyu Yao (Inactive) [ 11/Apr/18 ] |
|
pasette, I just had a quick try and found the change worked for show tables and show collections.They all use the getCollectionNames helper I made change to. I am going to take another look at other internal clients of listCollections that only require the name. |
| Comment by Daniel Pasette (Inactive) [ 11/Apr/18 ] |
|
geert.bosch, is the plan here to plumb this into the show tables and show collections shell helpers as well? IIRC, one of the goals of this work was to avoid blocking while a txn is in progress, but if it's not hooked up, this work won't help. Are there other internal clients of listCollections that only require the name? |
| Comment by Ian Whalen (Inactive) [ 06/Apr/18 ] |
|
Ack. geert.bosch and milkie should this get assigned out now since it sounds like we'll want it for 3.7.4 feature complete? |
| Comment by Bernie Hackett [ 06/Apr/18 ] |
|
Just something drivers would have to add support for. The work is likely minor. |
| Comment by Ian Whalen (Inactive) [ 06/Apr/18 ] |
|
Putting in 3.7.4 under the assumption there is Drivers impact here. behackett can you confirm if that's true so we can bump out a bit if not? |