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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v4.4, v4.2
    • Execution Team 2021-05-17
    • 115

      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.

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

              Created:
              Updated:
              Resolved: