TTL document expiration is ont working anymore (mongo 2.4.10)

104 views
Skip to first unread message

Jean Philippe Caruana

unread,
Sep 25, 2014, 5:34:58 AM9/25/14
to mongod...@googlegroups.com
Hi,

I am using TTL indexes on Mongo 2.4.10 but it doesn't work anymore (and I don't know since when...).

For instance, on one collection, I've set it to 5 days (432000 seconds) as we can see with db.collectionName.getIndexes() :
    {
            "v" : 1,
            "key" : {
                    "date" : -1,
                    "background" : true,
                    "expireAfterSeconds" : 432000
            },
            "ns" : "dbName.collectionName",
            "name" : "date_-1_background__expireAfterSeconds_432000"
    }
 

But a single findOne() shows me an older document than expected, from June :

    "_id" : ObjectId("53a058140cf25876d78f7d03"),
    "_class" : 
    "productIds" : [
            NumberLong(1045),
            NumberLong(1124),
            NumberLong(1277),
            NumberLong(800),
            NumberLong(978)
    ],
    "userId" : NumberLong(214120),
    "date" : ISODate("2014-06-16T11:45:21.341Z")
 

All seemed to work fine until recently : we didn't notice it before in production. This is happening on all my databases and all concerned collections.

I've checked my server configuration, TTL monitor is enabled:

my_replicat:PRIMARY> db.adminCommand({getParameter:1, ttlMonitorEnabled:1 })
{ "ttlMonitorEnabled" : true, "ok" : 1 }

> db.version()
2.4.10


Thanks

Asya Kamsky

unread,
Sep 27, 2014, 11:29:00 PM9/27/14
to mongodb-user

Looks like you asked this twice - I answered in the other thread - the index isn't created correctly.

Asya

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/b89315ac-2fd8-4879-9248-dc98196a8f81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages