[SERVER-1864] Support Resizing Capped Collections Created: 27/Sep/10 Updated: 23/Mar/23 Resolved: 04/Mar/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | 1.7.0 |
| Fix Version/s: | 6.0.0-rc0 |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Tejaswi Nadahalli | Assignee: | Fausto Leyva (Inactive) |
| Resolution: | Done | Votes: | 64 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Execution Team 2021-12-13, Execution Team 2021-12-27, Execution Team 2022-01-10, Execution Team 2022-01-24, Execution Team 2022-02-07, Execution Team 2022-02-21, Execution Team 2022-03-07 | ||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Allow users to resize capped collections using the 'collMod' command. Create two new parameters for 'collMod' to either increase or decrease the size and/or the document limit of a capped collection. Example resize command:
This operation may only be performed when the featureCompatibilityVersion is set to at least 6.0. |
| Comments |
| Comment by Githook User [ 03/Mar/22 ] |
|
Author: {'name': 'Faustoleyva54', 'email': 'fausto.leyva@mongodb.com', 'username': 'Faustoleyva54'}Message: |
| Comment by Eric Milkie [ 25/Jun/21 ] |
|
If you change "disk size" to "uncompressed size", that use case is what the Description in this ticket is for (we would probably allow changes in the cap size in both directions, if we implmented this ticket). |
| Comment by Puya Daravi [ 24/Jun/21 ] |
|
milkie Fair enough. What if we change "disk size" to "uncompressed size" in the above use case? |
| Comment by Eric Milkie [ 24/Jun/21 ] |
|
The use case you describe isn't possible to implement, because deleting documents does not necessarily turn into a reduction in on-disk file size unless you wait for the deletes to fall out of the MVCC history window, and then run a compaction, and then you're still not guaranteed to get the disk space back. |
| Comment by Puya Daravi [ 24/Jun/21 ] |
|
Hi, since capped collections seem to be planned to be deprecated. Is there currently a way to achieve this use case with existing MongoDB features? If not are there any features planned that would enable this use case?
|
| Comment by Justin Smestad [ 03/Mar/11 ] |
|
We would love to see this feature make it into MongoDB 1.9 if possible. Capped collections are somewhat crippled until then since they are possibly the only limit in MongoDB with regards to effective changing of schema design/implementation. |