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 |
---|---|---|---|
Timeseries collections - increase max count of documents per bucket | 3 | 378 | Jul 2024 |
Is Change Streams delivery guaranteed? | 0 | 236 | Jul 2024 |
Inserting Data File in MongoDB | 4 | 61 | Sep 2024 |
Find and insert data, from different collections, inside different databases, without replica set | 0 | 48 | Dec 2024 |
Minimizing cluster latency on writes, writeConcern, inMemory storage | 0 | 13 | Mar 19 |