Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-53651

Just search for user-issued profiled aggregation in read_pref_cmd.js

    • Fully Compatible
    • ALL
    • Sharding 2021-02-08
    • 28

      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)

            Assignee:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: