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

improve handling of large/NaN values for expireAfterSeconds TTL index option

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.0.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL
    • v4.4, v4.2
    • Execution Team 2021-05-17
    • 115

    Description

      The TTLMonitor is responsible for removing expired documents from a collection with a TTL index. The expireAfterSeconds option is a numerical value that is used to calculate the expiration time for removing documents.

      Currently, the TTLMonitor ensures that this option is a numerical type but does not check for NaN or values that exceed the range of a long long type.

      To handle existing TTL indexes that may contain unrepresentable values, we should consider extracting the expireAfterSeconds option using BSON::safeNumberLong() instead. We would still be able to evaluate a reasonable expiration time from the safely converted numerical value.

      Attachments

        Issue Links

          Activity

            People

              benety.goh@mongodb.com Benety Goh
              benety.goh@mongodb.com Benety Goh
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: