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

Aggregation cursor behaves inconsistently in mixed-version cluster

    • ALL
    • Hide

      -Start a sharded cluster with the following members:
      2.6 mongod (shard a)
      2.4 mongod (shard b)
      2.6 mongos

      • Shard a namespace and insert some data.
      • Stop the balancer.
      • Manually move chunks to both shards, run aggregation cursor query, get error.
      • Manually move chunks to 2.6 shard, run aggregation cursor query, get no error.
      Show
      -Start a sharded cluster with the following members: 2.6 mongod (shard a) 2.4 mongod (shard b) 2.6 mongos Shard a namespace and insert some data. Stop the balancer. Manually move chunks to both shards, run aggregation cursor query, get error. Manually move chunks to 2.6 shard, run aggregation cursor query, get no error.

      We deploy a sharded cluster with a 2.6 mongos, a 2.6 mongod as one shard and a 2.4 mongod as the second shard. In this configuration, we run an aggregation query with the cursor option specified:

      > db.coll.aggregate([{$match: {a: { "$lte" : 10}}}], { cursor: { batchSize: 10 }})
      

      If both shards have chunks on them, then we get the following error: "exception: All shards must support cursors to get a cursor back from aggregation"

      However, if only the 2.6 mongod has data and the 2.4 shard is empty, then this operation runs the aggregation query without an error and returns the cursor normally.

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            samantha.ritter@mongodb.com Samantha Ritter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: