[SERVER-69773] all_collection_stats.js should compare only few selected fields Created: 16/Sep/22  Updated: 29/Oct/23  Resolved: 28/Oct/22

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 6.1.1, 6.0.3, 6.2.0-rc0

Type: Task Priority: Major - P3
Reporter: Enrico Golfieri Assignee: Pol Pinol
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-67891 Implement basic structure of $sharded... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v6.1, v6.0
Sprint: Sharding EMEA 2022-10-17, Sharding EMEA 2022-10-31
Participants:
Linked BF Score: 15

 Description   

all_collection_stats.js is a test for the new aggregation pipeline stage  _internalAllCollectionStats that reports the statistics of all collections.
However, the test simply compares the json result of _internalAllCollectionStats with calling multiple times $collStats.

The result should be theoretically equivalent, unfortunately this test might fail since the collection stats contains some cache information that apparently can change among successive calls.

My suggestion is to simply compare some selected fields. However, any other solution is welcomed. 



 Comments   
Comment by Githook User [ 31/Oct/22 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: SERVER-69773 Fix entire json comparison from $_internalAllCollectionStats testing

(cherry picked from commit 9ef93f783419da5734d3afdf84e987ed39a1591f)
Branch: v6.1
https://github.com/mongodb/mongo/commit/7452920695f74479c0e53e37a8aa01e800e58344

Comment by Githook User [ 31/Oct/22 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: SERVER-69773 Fix entire json comparison from $_internalAllCollectionStats testing

(cherry picked from commit 9ef93f783419da5734d3afdf84e987ed39a1591f)
Branch: v6.0
https://github.com/mongodb/mongo/commit/5048c43f1086b3775ee6de724d43a8755ed8a954

Comment by Githook User [ 28/Oct/22 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: SERVER-69773 Fix entire json comparison from $_internalAllCollectionStats testing
Branch: master
https://github.com/mongodb/mongo/commit/9ef93f783419da5734d3afdf84e987ed39a1591f

Generated at Thu Feb 08 06:14:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.