I have an application that stores URL locations from aws into my mongodb collections which has been working fine. Suddenly documents started getting deleted without anyone dispatching the actions. I have checked but there are no TTL indexes as you can see in the image attached. What could be causing this? This is causing a big issue at the moment.
Skip to main content
Now the issue is this, in two new collections when:
- User A uploads their documents going to these two collections (Status All Good)
- User B uploads their documents (All of User A’s documents in these two collections are deleted and User B’s documents are retained)
- User C uploads their documents (Sometimes All of User B’s documents are deleted sometimes one is retained and only User C’s documents are retained)
What I have done:
- Created a middleware that checks document ownership preventing unauthorized deletion
- Created an audit log feature that logs all delete actions for these collections
- Checked if there exists a TTL index on either of these collections the only index is the id
New & Unread Topics
Topic | Replies | Views | Activity |
---|---|---|---|
“Operation `users.insertOne()` buffering timed out after 10000ms” | 1 | 1.0k | May 2024 |
Multiple proxy setup | 4 | 1.0k | Jul 2024 |
The best model between relational collections | 3 | 394 | Jul 2024 |
Is Change Streams delivery guaranteed? | 0 | 236 | Jul 2024 |
Upgrade from Mongo 6 to 8 and hint becoming really slow | 0 | 312 | Dec 2024 |