1) We have put expireAfterSeconds=15 on column of type: date
[
{
"v" : 1,
"key" : {
"_ts" : -1
},
"name" : "AnjaliIndex",
"ns" : "test.sessions",
"expireAfterSeconds" : 15
}
]
It is working fine on yesterdays date but is not working fine on todays date i.e it is removing data when i change document date from current date to yesterdays date where it should delete all data. (Current date which i given is even not future time but previous time)
Why is this happening? Is there any particular cycle or time when mongodb engine collect documents for expiry?
(I have seen related question but in that question use case is different where he was giving future date)
Mongo DB Version: 3.2.22
Sample Document:(not gettinkg deleted)
{
"_id" : ObjectId("5dde452818c87122389bbc09"),
"authorization" : "a0ce0b43-194d-4402-99cb-b660b3365757",
"userNumber" : "gourav@gmail.com",
"_ts" : ISODate("2019-11-27T13:43:04.776Z")
}