I have a collection with documents that contain two fields:
{
"needsProcessing" : true,
"lastUpdated" : ISODate("2024-08-17T19:09:46.099+0000")
}
I have a Partial, TTL index as follows:
{
"v" : 2.0,
"key" : {
"lastUpdated" : 1.0
},
"name" : "lastUpdated_1",
"background" : true,
"partialFilterExpression" : {
"needsProcessing" : false
},
"expireAfterSeconds" : 432000.0
}
Yet the TTL thread never seems to run
{
"collSubpassesIncreasedPriority" : NumberLong(0),
"deletedDocuments" : NumberLong(0),
"passes" : NumberLong(0),
"subPasses" : NumberLong(0)
}
Things that have not worked so far.
- I have tried creating a simple TTL index without the partial filter.
- I have tried restarting the Mongod service.
- I have deleted and recreated the indexes multiple times.
- I have stopped all writes and reads to the DB thinking maybe it was overloaded.
- I have checked the mongod.log, and there are no TTLMonitor entries.
- I am running manual deletes using the index now just to make sure the index itself is correct and to keep the data cleaned up.
- I have looked at various posts here regarding TTL indexes, but none seem to apply so far.
Full disclosure, this server started as part of a replica set, but we removed the replica set and when I run rs.status() I get :
MongoServerError[NoReplicationEnabled]: not running with --replSet
Is there anything I can do in MongoDB 7.0.12 to kick off the TTL thread manually? What am I missing?