“解封"一个有上限的 MongoDB 集合 [英] "uncap" a capped MongoDB collection
本文介绍了“解封"一个有上限的 MongoDB 集合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法解封"一个封顶的集合?创建新集合并复制数据对我来说不是一个选项.
is there a way to "uncap" a capped collection? Creating a new collection and copy the data isn't an option for me.
谢谢
推荐答案
不,您可以使用convertToCapped"命令将非封顶集合转换为封顶集合,但没有其他办法.
No, You can convert a non-capped collection to a capped collection using the "convertToCapped" command but there's no way to go the other way.
您唯一的选择是将集合克隆为无上限的集合并重命名,这显然会导致停机.
Your only option is to clone the collection to a non capped one and rename it which obviously involves downtime.
这篇关于“解封"一个有上限的 MongoDB 集合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文