Using mgo tx is it possible to convert the pending collection to a capped collection?

23 views
Skip to first unread message

Davis Ford

unread,
Nov 7, 2016, 12:08:04 PM11/7/16
to mgo-users
The pending collection is growing large in our dataset, and manually truncating it and compressing after is a pain.  

Can I convert the pending collections to capped with a TTL to expire the docs and remove them without an issue?

Thanks

Ivan Mladenovic

unread,
Nov 8, 2016, 2:22:37 AM11/8/16
to mgo-users
Yes, 

Just create TTL index and mongo will take over.
But depending on how large collection is , you may experience issues like slowdown.
Reply all
Reply to author
Forward
0 new messages