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

Tailable cursors should wait on empty capped collections

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.10, 2.6.1
    • Component/s: Querying, Storage
    • Labels:
      None
    • Query Execution

      In current design a tailable cursor on an empty capped collection will be released immediately without waiting.

      db.createCollection("testz",{capped:true,size:100000})
      db.testz.find().addOption(2).addOption(32) //doesn't wait
      db.testz.insert({x:1})
      db.testz.find().addOption(2).addOption(32) //waits
      

      This behavior is very annoying for users who are creating tailable cursors in their apps, as they have to handle this case in some way to avoid high-intensive polling.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            alex.komyagin@mongodb.com Alexander Komyagin (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: