[SERVER-41814] metadata.infoObj field doesn't exist in collStats command output Created: 18/Jun/19  Updated: 27/Oct/23  Resolved: 24/Jun/19

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: 4.2.0-rc1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Alexey Butalov Assignee: Danny Hatcher (Inactive)
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 10 x64


Operating System: ALL
Steps To Reproduce:

Just create a collection with any index and run 

db.runCommand({collStats:"<name>"})

Output:

... "nindexes" : 2, "indexDetails" : { "_id_" : { "metadata" : { "formatVersion" : 8 }, ...

Participants:

 Description   

4.2.0.rc1 for Windows x64 binary version.

metadata.infoObj field doesn't exist in collStats command output.



 Comments   
Comment by Danny Hatcher (Inactive) [ 24/Jun/19 ]

If getIndexes() satisfies your requirements, I recommend using that going forward. I'm going to close this ticket for now but please feel free to leave a comment if it turns out you have lost functionality due to this change.

Comment by Alexey Butalov [ 24/Jun/19 ]

We used this field to get indexes information. But seems we can use db.collection.getIndexes() for this purpose now. 

Comment by Danny Hatcher (Inactive) [ 21/Jun/19 ]

This field was intentionally removed in SERVER-41073 as it could potentially cause issues in MongoDB 4.2 and it was determined that it was not useful. Do you have a use-case that requires the metadata.infoObj field?

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