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

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

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • ALL
    • 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. 

      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.

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

              Created:
              Updated:
              Resolved: