[SERVER-53651] Just search for user-issued profiled aggregation in read_pref_cmd.js Created: 08/Jan/21  Updated: 29/Oct/23  Resolved: 04/Feb/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 4.2.11
Fix Version/s: 4.2.13

Type: Bug Priority: Minor - P4
Reporter: Pierlauro Sciarelli Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: Sharding-EMEA, neweng, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2021-02-08
Participants:
Linked BF Score: 28

 Description   

This test executes an aggregation on test.user and makes sure that it has been executed exclusively on the primary node by simply checking that no secondary profiled any aggregation on the namespace.

Since the $indexStats command can be executed by internal threads and results in an aggregation being performed on the indexed collection, it is not enough to simply query system.profile to check whether any aggregation targeted test.user.

A possible solution is to add a comment to the aggregate command and then searching for a profiler entry matching it.

Putting it as low priority because it is a test-only issue that just affects v4.2 (SERVER-46567 enhanced the query in later versions)



 Comments   
Comment by Githook User [ 04/Feb/21 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-53651 Just search for user-issued profiled aggregation in read_pref_cmd.js
Branch: v4.2
https://github.com/mongodb/mongo/commit/bbf5805c5876f4a4b7b699c853d03d0727c82241

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