[SERVER-26513] listCollections output should include _id index spec as idIndex Created: 07/Oct/16 Updated: 17/May/19 Resolved: 18/Oct/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.4.0-rc1 |
| Type: | Task | Priority: | Blocker - P1 |
| Reporter: | Tess Avitabile (Inactive) | Assignee: | Tess Avitabile (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||||||
| Sprint: | Query 2016-10-31 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
The idIndex field will not be included for views or collections without an _id index. |
| Comments |
| Comment by Tess Avitabile (Inactive) [ 21/Oct/16 ] |
|
steve.briskin, we were considering: would it have made more sense for us to include the idIndex field as part of the options field, so that you could simply append all of the options to the create command, instead of having to treat idIndex specially? It wouldn't be too late for us to change this. |
| Comment by Tess Avitabile (Inactive) [ 18/Oct/16 ] |
|
This change adds a field idIndex to the listCollections output for any collection with an _id index. The idIndex field contains the index spec for the _id index. |
| Comment by Githook User [ 18/Oct/16 ] |
|
Author: {u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}Message: |
| Comment by Tess Avitabile (Inactive) [ 17/Oct/16 ] |
|
steve.briskin, we were wondering whether this ticket is necessary for backup, since you can also get the _id index spec by calling getIndexes. It is somewhat undesirable for the server to add the _id index spec to the listCollections output, since this may require drivers changes, and we would need to decide on the correct output for views and collections with no _id index. Would it work for you to call getIndexes to get the _id index spec? |
| Comment by Tess Avitabile (Inactive) [ 12/Oct/16 ] |
|
Adding the _id index spec to the listCollections output causes the dbhashes to differ for master-slave configurations, because the _id indexes can have different versions. |