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

Compass bug when similar views display incorrect values

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.24.1
    • Affects Version/s: None
    • Component/s: UI / UX, Views
    • None
    • Environment:
      Compass 1.12.4
      Windows 10 x64
      MongoDB 3.4.6 Community
    • Not Needed

      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" } } } ]
      

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

              Created:
              Updated:
              Resolved: