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

cursor iteration freeze after the 101 docs (1st batch + 1)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide
      1. make any big collection. My collection contains 600, 000 + docs, each is about 100k in size.
      2. make an simple query on it (db.collection.find())
      3. iterate over the cursor returned
      4. the iteration will wait for a very long time after 101 docs. 
      Show
      make any big collection. My collection contains 600, 000 + docs, each is about 100k in size. make an simple query on it (db.collection.find()) iterate over the cursor returned the iteration will wait for a very long time after 101 docs. 

      Description

      I got an cursor from the simplest query possible

      (b.some_collection.find()),

      and if the collection is big, the iteration on the cursor will pause after the first 101 docs are iterated (the 1st batch plus 1 more doc). The mongod process is doing a lot I/O reading. It looks like it's loading the whole data in. 

      That will make my code freeze for a long time for large collections. The same thing happens no matter I do the query via pymongo or in the mongo shell.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nick.brewer Nick Brewer
              Reporter:
              rambo_yuanbo@outlook.com bo yuan
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: