[SERVER-13955] Tailable cursors should wait on empty capped collections Created: 15/May/14  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Querying, Storage
Affects Version/s: 2.4.10, 2.6.1
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Alexander Komyagin Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Execution
Participants:

 Description   

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.


Generated at Thu Feb 08 03:33:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.