[SERVER-81864] Provide an API to obtain a list of necessary config database collections for debugging Created: 04/Oct/23 Updated: 06/Feb/24 |
|
| Status: | Blocked |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Maria van Keulen | Assignee: | Aitor Esteve Alvarado |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Sharding EMEA
|
||||||||||||||||
| Sprint: | Sharding EMEA 2023-10-30, CAR Team 2023-11-13, CAR Team 2023-11-27, CAR Team 2023-12-11, CAR Team 2023-12-25, CAR Team 2024-01-08, CAR Team 2024-01-22, CAR Team 2024-02-05, CAR Team 2024-02-19 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Story Points: | 3 | ||||||||||||||||
| Description |
|
Currently, users who would like to review the contents of the Sharding config database for debugging purposes can output this database via mongodump (see The collections that can/cannot be output have historically been tracked in hardcoded lists in the mongodump code (and similarly for the mongorestore code). A more robust solution moving forward is to have a Sharding API for obtaining this list of collections, to avoid unexpected auth errors like those described in the TOOLS ticket above, and also to ensure that only the necessary debugging collections are included. This list should ideally include only collections that are safe for both mongodump and mongorestore. When connecting to any Server versions that don't have this API, the tools should continue to use hardcoded lists. To avoid auth errors like in |
| Comments |
| Comment by Maria van Keulen [ 10/Oct/23 ] |
|
kaloian.manassiev@mongodb.com I'll defer to max.hirschhorn@mongodb.com and martin.barciela-pires@mongodb.com on the answer to that question, as they are more familiar with this workflow than I. |
| Comment by Kaloian Manassiev [ 10/Oct/23 ] |
|
Also, maria.vankeulen@mongodb.com, can we please clarify what is involved in "... [reviewing] the contents of the Sharding config database for debugging purposes" ? I am asking because it can mean different things:
From reading |
| Comment by Tommaso Tocci [ 06/Oct/23 ] |
|
max.hirschhorn@mongodb.com pointed out that there are collections in the config database that are:
One example is the config.image_collection . Considering this, I think it makes sense to provide an API owned and maintained by core server team that return a list of collection to include in the config dump for debugging purposes. |
| Comment by Tommaso Tocci [ 06/Oct/23 ] |
|
I was wondering if we can take a simpler approach for this. The idea is that the mongodump tool will call listCollection on the config database (as it does today). It will try to dump all collections and if the user doesn't have enough permission to read a specific collection, it will simply skip that collection, emit a warning and continue dumping the other collections for which the user has enough permission. maria.vankeulen@mongodb.com do you think the proposal make sense? if not, why? |