[SERVER-69223] Resizing capped collection does not work Created: 29/Aug/22  Updated: 29/Aug/22  Resolved: 29/Aug/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 6.0.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Teemu Lankila Assignee: Louis Williams
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-1864 Support Resizing Capped Collections Closed
is related to DOCS-15579 [Server] Resize of capped collections... Closed
Operating System: ALL
Steps To Reproduce:

Follow instructions from documentation.

Sprint: Execution Team 2022-09-05
Participants:

 Description   

When trying to increase capped collection size from mongosh as documented:

https://www.mongodb.com/docs/manual/core/capped-collections/#change-a-capped-collection-s-size

db.runCommand( { collMod: "log", cappedSize: 100000 } )

An error happens: MongoServerError: Cannot change the size limits of a capped collection.
User is authenticated and can create new collections and modify existing content in other collections.
I have only tested with one capped collection in the newest 6.0.01. The capped size was 1 GB and tried to increase it to 2 GB.



 Comments   
Comment by Louis Williams [ 29/Aug/22 ]

Great, I'm glad that this resolved your issue!

Comment by Teemu Lankila [ 29/Aug/22 ]

I verified this to be working after setting the featureCompatibilityVersion to 6.0

Command responded with ok and the collection stats() now show increased maxSize

Comment by Louis Williams [ 29/Aug/22 ]

Hi teemu.lankila@ioliving.com. In order to resize a capped collection in 6.0, you must also upgrade your featureCompatibilityVersion to 6.0.

This appears to be missing from the documentation, so I have requested a change. Please let me know if this resolves your issue.

Generated at Thu Feb 08 06:12:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.