| Steps To Reproduce: |
Connect to a cluster using mongosh, and execute the following commands to confirm the issue:
Enterprise [mongos] test> db.runCommand({collStats: 'users'})
|
{
|
sharded: false,
|
// Full output omitted
|
}
|
|
Enterprise [mongos] test> db.users.aggregate([{$collStats: {}}])
|
[
|
{
|
ns: 'test.users',
|
shard: 'shard01',
|
host: 'iceberg:27019',
|
localTime: ISODate("2023-07-06T15:42:43.880Z")
|
}
|
]
|
|
Enterprise [mongos] test> var resp = db.users.aggregate([{$collStats: {storageStats: {}}}]).next();Enterprise [mongos] test> Object.keys(resp);
|
[ 'ns', 'shard', 'host', 'localTime', 'storageStats' ]
|
Enterprise [mongos] test> Object.keys(resp['storageStats']);
|
[
|
'size', 'count',
|
'avgObjSize', 'numOrphanDocs',
|
'storageSize', 'freeStorageSize',
|
'capped', 'wiredTiger',
|
'nindexes', 'indexDetails',
|
'indexBuilds', 'totalIndexSize',
|
'indexSizes', 'totalSize',
|
'scaleFactor'
|
]
|
|