Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-2734

Compass bug when similar views display incorrect values

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 1.24.1
    • None
    • UI / UX, Views
    • None
    • Compass 1.12.4
      Windows 10 x64
      MongoDB 3.4.6 Community
    • Not Needed

    Description

      I have two views on the same collection. They both calculate a sum but using different filters.

      If I open the first view in the Compass then I see a correct sum. Then if I switch to the second view I see an invalid sum (from the first view).

      Opening any other views (e. g. a collection) and switching back to the second view helps - it starts showing correct value. Switching to the first view will show values from the second.

      Pipeline I am using for views:

      [ { $match: { state:  { $in: [1, 2] } } }, { $group: { _id: "$username", sum : { $sum: "$weight" } } } ]
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            arapoport Andrej Rapoport
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: