-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
ALL
-
Sharding 2020-09-07
-
9
The test should filter the profiler for entries matching "op": "insert" to ensure it validates the correct profile entry.
Context
Currently, sharded_profile.js calls findOne() on shard0's profiler and checks that the profile entry matches the insertion performed on the collection.
However, it's possible that other commands could be logged in the profiler from tasks running in the background - like the aggregate sent by the PeriodicShardedIndexConsistencyChecker, whose profile entry can be differentiated because it has "op": "command" rather than "op": "insert". Thus, the test could fail by trying to validate the profile entry added during the index consistency check rather than the entry for the insertions.