Ticket: User Report : Readconcern so confusing

const pipeline = [

    {

      $group: {

        _id: "$email",

        count: {

          $sum: 1,

        },

      },

    },

    {

      $sort: {

        count: -1,

      },

    },

    {

      $limit: 20,

    },

  ]

  // TODO Ticket: User Report

  // Use a more durable Read Concern here to make sure this data is not stale.

  const readConcern = comments.readConcern

  const aggregateResult = await comments.aggregate(pipeline, {

    readConcern: { level: "majority" },

  })

Here is my pipeline. I just go around the forum and seem it should be correct. I don’t know how it gets only 277/331 comments.

Yes, it looks correct. I got the same problem, my unit test is failing, but I could get my ticket from the “status page” in the UI.

1 Like