[SERVER-3064] do not allow _id scans on capped collections Created: 09/May/11  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Eliot Horowitz (Inactive) Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 1
Labels: query_triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-5516 Capped collections (tracking ticket) Closed
Assigned Teams:
Query Execution
Participants:

 Description   

_id indexes are not created on capped collections by default.
Very often people don't realize or forget and assume it's there, or use methods like save() which assume.

We should assert on any table scan where the query is

{ _id : ... }

.



 Comments   
Comment by auto [ 06/Aug/11 ]

Author:

{u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: SERVER-3064 out for now - too many issues with rollback
Branch: master
https://github.com/mongodb/mongo/commit/7cc114bbc0b5f8af2b7d891906b32bc85aed6fc9

Comment by Eliot Horowitz (Inactive) [ 06/Aug/11 ]

too pieces to do for 2.0
making it a warning for now

Comment by auto [ 05/Aug/11 ]

Author:

{u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: do not allow _id scans on capped collections SERVER-3064
Branch: master
https://github.com/mongodb/mongo/commit/72db2c419781158ece1e68302d753d49478ef1cd

Comment by auto [ 06/Jun/11 ]

Author:

{u'login': u'dwight', u'name': u'dwight', u'email': u'dwight@10gen.com'}

Message: disable SERVER-3064 temporarily it is breaking replica set rollback
replica sets can do queries by _id on capped collections when the rollback happens. so we can't do this til we figure out something there.
Branch: master
https://github.com/mongodb/mongo/commit/4490b40bc6f36bb2abd047d16ad372310e9a22e5

Comment by auto [ 03/Jun/11 ]

Author:

{u'login': u'dwight', u'name': u'dwight', u'email': u'dwight@10gen.com'}

Message: fix test for new server behavior SERVER-3064
Branch: master
https://github.com/mongodb/mongo/commit/a0a0d98f39ed51716f4c6e353e4466cfb2307e65

Comment by Eliot Horowitz (Inactive) [ 03/Jun/11 ]

I added commented out tests in jstests/capped9.js
Once those work should be good

Comment by auto [ 03/Jun/11 ]

Author:

{u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: notes and test for SERVER-3064
Branch: master
https://github.com/mongodb/mongo/commit/8f6f0614bcf134352d3ff39fb136b9a9075efc21

Comment by Dwight Merriman [ 03/Jun/11 ]

https://github.com/mongodb/mongo/commit/3ea739ba8d3cafade93b03a42eabda335159cbcb

Comment by Dwight Merriman [ 03/Jun/11 ]

we will need to check on both queries and updates

Comment by auto [ 03/Jun/11 ]

Author:

{u'login': u'gerald-lindsly', u'name': u'gerald-lindsly', u'email': u'gerald.lindsly@gmail.com'}

Message: SERVER-3064
Branch: master
https://github.com/mongodb/mongo/commit/1ee161dfbe597ea5627df867b2b6ca32a34bbf2e

Comment by auto [ 03/Jun/11 ]

Author:

{u'login': u'gerald-lindsly', u'name': u'gerald-lindsly', u'email': u'gerald.lindsly@gmail.com'}

Message: SERVER-3064
Branch: master
https://github.com/mongodb/mongo/commit/1ee161dfbe597ea5627df867b2b6ca32a34bbf2e

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