[DOCS-15313] Capped collection documentation is not correct Created: 04/May/22 Updated: 30/Oct/23 Resolved: 14/Jul/23 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual, Server |
| Affects Version/s: | None |
| Fix Version/s: | Server_Docs_20231030 |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Fermín Galán | Assignee: | Nick Villahermosa |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | quick-win, server-docs-bug-bash | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
MongoDB 5.0.6 |
||
| Participants: | |
| Days since reply: | 29 weeks, 5 days ago |
| Description |
|
Capped collections documentation at https://www.mongodb.com/docs/manual/core/capped-collections/ specifies that "TTL indexes are not compatible with capped collections." However, the following tests with an empty database (i.e. no collections in the database when the test is done): {{> show collections ) { "ok" : 1 }> db.c.isCapped() , { expireAfterSeconds: 3600 }) { "numIndexesBefore" : 1, "numIndexesAfter" : 2, "createdCollectionAutomatically" : false, "ok" : 1 }> db.c.getIndexes() , , So, I understands the documentation is not correct or "compatibility" should be explained better (i.e. the index can be created but expiration on it is ignored).
With MongoDB 7.0.0-rc4 and MongoDB 6.0.7
With MongoDB 5.0.18:
Will update the 5.0 docs and backport to 4.4 and 4.2 |
| Comments |
| Comment by Nick Villahermosa [ 14/Jul/23 ] |
|
Backports: v4.4 |
| Comment by Jeffrey Allen [ 04/May/22 ] |
|
I found some additional context in Slack that I'll capture here in the ticket so we don't lose it due to retention policy: gregory.wlodarek@mongodb.com wrote:
My understanding is that we should update the language on the capped collection page to not make a blanket statement that TTL indexes are incompatible, but that the TTL index won't perform deletes. |
| Comment by Fermín Galán [ 04/May/22 ] |
|
Sorry the formatting of the code part... I'm not used to JIRA syntax. I hope it is clear, but in negative case please tell me and I can provide more information. |