Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12482

TTL using microseconds won't work anymore

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.9
    • Component/s: None
    • Environment:
      Debian 6.0.8
    • Linux
    • Hide

      mongo:
      db.app.events.ensureIndex(

      { "expireAt": 1 }

      ,

      { expireAfterSeconds: 0 }

      )

      using pymongo:
      expires = (datetime.datetime.now() + datetime.timedelta(0,60))

      toBeCached =

      {'url': link, 'code': code, 'headers': headers, 'content': content, 'expireAt': expires}

      pages.insert(toBeCached)

      Show
      mongo: db.app.events.ensureIndex( { "expireAt": 1 } , { expireAfterSeconds: 0 } ) using pymongo: expires = (datetime.datetime.now() + datetime.timedelta(0,60)) toBeCached = {'url': link, 'code': code, 'headers': headers, 'content': content, 'expireAt': expires} pages.insert(toBeCached)

      Setting the content to expire at a certain date with microseconds causes the expiration not to happen.
      I've used the mongod with python and the date, by default, was outputted with microseconds, so I did notice the issue.

      Cheers from Italy!

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            bigalex Alessio Periloso
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: