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 |
---|---|---|---|
Does Mongo cache the whole index or just the parts that it needs to service a Mongo Query? | 6 | 527 | Jun 2024 |
Advanced lookup using arrays | 5 | 466 | Aug 2024 |
what is a best approach to avoid Race Condition when same document is getting updated by multiple spring boot application | 0 | 51 | Sep 2024 |
Find and insert data, from different collections, inside different databases, without replica set | 0 | 48 | Dec 2024 |
Cant Move empty Chunk | 1 | 39 | Dec 2024 |