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

incorrect options getting passed by sharded explain()

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.2.0
    • Affects Version/s: 2.0.1
    • Component/s: Sharding
    • None
    • ALL

      Seems as if the mongos explain() options handling for batchSize is incorrect - TailableCursor option seems to be set instead.

      https://groups.google.com/group/mongodb-user/browse_thread/thread/160c672605614b5e

      MongoDB shell version: 2.0.1
      connecting to: localhost:27018/offerStore
      mongos> db.offer.count({shopId: 205640});
      166031
      mongos> var count = 0;
      mongos> var cursor = db.offer.find({shopId: 205640}).batchSize(1000);
      mongos> while(cursor.hasNext()){cursor.next(); count++;}
      2317
      mongos> db.offer.find({shopId: 205640}).batchSize(1000).explain()
      Mon Jan  9 14:46:09 uncaught exception: error: {
              "$err" : "could not initialize cursor across all shards because : no
      ts field in query @ offerStoreDE2/s197:27018,s209:27018,s198:27018 ::
      and :: no ts field in query @ offerStoreDE3/
      s117:27018,s129:27018,s118:27018 :: and :: no ts field in query @
      offerstore/s142:27018,s144:27018,s143:27018",
              "code" : 14827
      }
      
      mongos> db.offer.count({shopId: 205640});
      166031
      
      Here are the router logs (level 6):
      http://pastebin.com/raw.php?i=UbUBdTqf 
      

            Assignee:
            greg_10gen Greg Studer
            Reporter:
            greg_10gen Greg Studer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: