aggregation results for same dataset/query differ on mongodb 2.4.4 vs 2.5.3

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.4.4, 2.5.3
    • Component/s: Querying
    • None
    • Environment:
      Ubuntu 12.04 (64 bit)
    • Linux
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      With reference to the attached dataset test9371.json imported into a collection 'zips' (on mongodb 2.4.4 and mongodb 2.5.3),
      when we run the following query :

      db.zips.aggregate( { $group:
                               { _id: { state: "$state", city: "$city" },
                                 zipcount : {$sum : 1},
                                 pop: { $sum: "$pop" } } },
                             { $sort: { zipcount: 1 } },
                             { $group:
                               { _id : "$_id.state",
                                 biggestCity:  { $last: "$_id.city" },
                                 population:   { $last: "$pop" },
                              zipcount : { $last : "$zipcount"}
                                  } } ,{ $sort : {population : -1}})
      

      different results are returned on mongodb 2.4.4 (pls refer to attached results_244.png) and mongodb 2.5.3.(pls refer results_253.png).
      Could you please investigate whats causing this discrepancy? Thank you

        1. aggregation_query.txt
          0.6 kB
        2. results_244.png
          results_244.png
          108 kB
        3. results_253.png
          results_253.png
          129 kB
        4. test9371.json
          2 kB

              Assignee:
              Mathias Stearn
              Reporter:
              Ravi Shakya
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: