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

find usings sort,skip,limit where sort is on an unindexed attribute produces an error when executed from mongos command prompt but works correctly from mongod command prompt.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.8.0-rc0
    • Component/s: Querying, Sharding
    • Labels:
    • Environment:
      cluster with a single node 3 server replica set
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

       
      db.Device.find ({AccountId : 223830}).sort( {DeviceName : 1}).skip(50000).limit(20)
       
      QA1MONGOS1:
      mongos> db.Device.find ({AccountId : 223830}).sort( {DeviceName : 1}).skip(50000).limit(20)
      error: { "$err" : "error querying server", "code" : 15988 }
       
       
      QA1MONGODB2:
      PRIMARY> db.Device.find ({AccountId : 223830}).sort( {DeviceName : 1}).skip(50000).limit(20)
      Successfully returns the data
       
      Log snippet
       
      Wed Nov 14 15:44:49 [conn384] recv(): message len 318953456 is too large318953456
      Wed Nov 14 15:44:49 [conn384] DBClientCursor::init lazy say() failed
      Wed Nov 14 15:44:49 [conn384] DBClientCursor::init message from say() was empty
      Wed Nov 14 15:44:49 [conn384] got not master for: 172.16.170.142:20007
      Wed Nov 14 15:44:49 [conn384] warning: db exception when finishing on rs0:rs0/172.16.170.141:20007,172.16.170.142:20007,172.16.170.143:20007, current connection state is { state: { conn: "rs0/172.16.170.141:20007,172.16.170.142:20007,172.16.170.143:20007", vinfo: "Reporting.Device @ 1|50||5085a74f60f379d79eeaac5b", cursor: "(empty)", count: 0, done: false }, retryNext: false, init: true, finish: true, errored: false } :: caused by :: 15988 error querying server

      Show
      db.Device.find ({AccountId : 223830}).sort( {DeviceName : 1}).skip(50000).limit(20) QA1MONGOS1: mongos> db.Device.find ({AccountId : 223830}).sort( {DeviceName : 1}).skip(50000).limit(20) error: { "$err" : "error querying server", "code" : 15988 } QA1MONGODB2: PRIMARY> db.Device.find ({AccountId : 223830}).sort( {DeviceName : 1}).skip(50000).limit(20) Successfully returns the data Log snippet Wed Nov 14 15:44:49 [conn384] recv(): message len 318953456 is too large318953456 Wed Nov 14 15:44:49 [conn384] DBClientCursor::init lazy say() failed Wed Nov 14 15:44:49 [conn384] DBClientCursor::init message from say() was empty Wed Nov 14 15:44:49 [conn384] got not master for: 172.16.170.142:20007 Wed Nov 14 15:44:49 [conn384] warning: db exception when finishing on rs0:rs0/172.16.170.141:20007,172.16.170.142:20007,172.16.170.143:20007, current connection state is { state: { conn: "rs0/172.16.170.141:20007,172.16.170.142:20007,172.16.170.143:20007", vinfo: "Reporting.Device @ 1|50||5085a74f60f379d79eeaac5b", cursor: "(empty)", count: 0, done: false }, retryNext: false, init: true, finish: true, errored: false } :: caused by :: 15988 error querying server
    • Sprint:
      Query 2.7.8

      Description

      create a collection of documents that have at least one attribute that is not indexed. The resulting size of all the documents must be as close to 32MB limit as possible

        Attachments

        1. datagen.zip
          373 kB
        2. exec_knob.js
          0.7 kB

          Issue Links

            Activity

              People

              Votes:
              2 Vote for this issue
              Watchers:
              19 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: