[SERVER-57502] The sharded `collStats` command pollutes the logs with `Unexpected field for mongos collStats` Created: 07/Jun/21  Updated: 12/Dec/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: 5.0.0-rc0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Backlog - Cluster Scalability
Resolution: Unresolved Votes: 1
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Cluster Scalability
Operating System: ALL
Participants:

 Description   

Looks like there are a number of fields which definitely need to be ignored (those starting with `$`) and then several ones, which need to be considered whether they should be aggregated or not:

[j0:s0] | 2021-06-07T17:06:52.097+00:00 I  COMMAND  22749   [conn318] "Unexpected field for mongos collStats","attr":{"fieldName":"freeStorageSize"}
[j0:s0] | 2021-06-07T17:06:52.098+00:00 I  COMMAND  22749   [conn318] "Unexpected field for mongos collStats","attr":{"fieldName":"indexBuilds"}
[j0:s0] | 2021-06-07T17:06:52.098+00:00 I  COMMAND  22749   [conn318] "Unexpected field for mongos collStats","attr":{"fieldName":"scaleFactor"}
[j0:s0] | 2021-06-07T17:06:52.098+00:00 I  COMMAND  22749   [conn318] "Unexpected field for mongos collStats","attr":{"fieldName":"$gleStats"}
[j0:s0] | 2021-06-07T17:06:52.098+00:00 I  COMMAND  22749   [conn318] "Unexpected field for mongos collStats","attr":{"fieldName":"lastCommittedOpTime"}
[j0:s0] | 2021-06-07T17:06:52.098+00:00 I  COMMAND  22749   [conn318] "Unexpected field for mongos collStats","attr":{"fieldName":"$clusterTime"}
[j0:s0] | 2021-06-07T17:06:52.098+00:00 I  COMMAND  22749   [conn318] "Unexpected field for mongos collStats","attr":{"fieldName":"$configTime"}
[j0:s0] | 2021-06-07T17:06:52.098+00:00 I  COMMAND  22749   [conn318] "Unexpected field for mongos collStats","attr":{"fieldName":"$topologyTime"}
[j0:s0] | 2021-06-07T17:06:52.098+00:00 I  COMMAND  22749   [conn318] "Unexpected field for mongos collStats","attr":{"fieldName":"operationTime"}
[j0:s0] | 2021-06-07T17:06:52.101+00:00 I  COMMAND  22749   [conn318] "Unexpected field for mongos collStats","attr":{"fieldName":"freeStorageSize"}
[j0:s0] | 2021-06-07T17:06:52.101+00:00 I  COMMAND  22749   [conn318] "Unexpected field for mongos collStats","attr":{"fieldName":"indexBuilds"}
[j0:s0] | 2021-06-07T17:06:52.101+00:00 I  COMMAND  22749   [conn318] "Unexpected field for mongos collStats","attr":{"fieldName":"scaleFactor"}



 Comments   
Comment by Kin Wai Cheung [ 20/Jan/22 ]

Hi, I can also see these messages on version 4.4.6 in a sharded cluster.

So this doesnt only affect 5.0.0

Generated at Thu Feb 08 05:42:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.