Where can I find executed TTL commands in Mongo DB

I would like to know document logs deleted using TTL indexing. I tried using db.setProfileLevel(2) and searched for db.system.profile.find({op:"remove"}).pretty() but did not answer anything.

Could you tell me the location of documents (kind of IDs , etc.) that are automatically deleted using the TTL MongoDB function?

+6
source share
1 answer

From the manual Expiring data from collections by installing TTL

When the TTL stream is active, you will see the delete operation in the output of db.currentOp () or the data collected in the profiler database.

try using delete instead of od remove in the request.

+1
source

Source: https://habr.com/ru/post/983027/


All Articles