When I try to remove a document in collection in MongoDB . It didn't remove because the collection is capped . My question is why? And is there a solution or other function can remove the document in this case?
No You cannot delete documents from a capped collection. And there is no possible workaround. The only thing you can do is drop()
the collection.
Gaurav Radadiya
You can not use remove function for capped collection. There are some restrictions
on capped collections. Also you can refer this document
for capped collection in mongoDB.
来源:https://stackoverflow.com/questions/33048282/how-to-remove-a-document-from-the-capped-collection