[SERVER-40974] Is it possible to Cap a GridFS collection Created: 03/May/19 Updated: 07/May/19 Resolved: 07/May/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | GridFS |
| Affects Version/s: | 4.0.9 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | RAJESH GUPTA | Assignee: | Danny Hatcher (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
As per description of GRIDFS; it creates 2 collection fs.files () and fs.chunks() but is it possible to make these collections as capped collection. If yes then please let me know. |
| Comments |
| Comment by Danny Hatcher (Inactive) [ 07/May/19 ] |
|
Hello Rajesh, Please note that the SERVER project is for bugs and feature requests. For general questions, I encourage you to ask our community by posting on the mongodb-user group or on Stack Overflow with the mongodb tag. The way GridFS works means that capping it would cause massive problems. Because the chunks and files collections are so interrelated, if necessary documents in either collection were removed due to a full collection then it would break the record that you originally inserted. So no, GridFS does not support capped collections. Thanks, Danny |
| Comment by RAJESH GUPTA [ 03/May/19 ] |
|
Is it also possible to make the existing collection as capped collection by defining the number of documents. |