Hi @chris ,
I executed this command and checked that TTLMonitor is enabled
db.adminCommand({getParameter:1, ttlMonitorEnabled:1})
{
ttlMonitorEnabled: true,
ok: 1,
'$clusterTime': {
clusterTime: Timestamp({ t: 1729152514, i: 71 }),
signature: {
hash: Binary(Buffer.from("c9b2d0179137db230da7cd723df3fa0ffd3bc198", "hex"), 0),
keyId: Long("7366182217619341331")
}
},
operationTime: Timestamp({ t: 1729152514, i: 71 })
}
Through service monitoring, I found that the db.serverStatus().metrics.ttl.passes field of the primary node in this cluster has not changed, but there has been a change in the db.serverStatus().metrics.ttl.passes field of the secondary node.
Therefore, I performed a master-slave switch on the cluster.
Within about ten minutes after the switch, the TTL index took effect, but after ten minutes, the db.serverStatus().metrics.ttl.passes of the new master did not change either, and the passes field of the secondary node changed. After testing again, the TTL index on the new master did not take effect again.
It seems like the primary node in the cluster ,TTL Monitor Thread had some problem