FTDC implementation does not convert infinity double values to Int64 maximum

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability
    • Fully Compatible
    • ALL
    • N&O 2025-11-10, N&O 2025-11-24, N&O 2025-12-08
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Per the FTDC spec:

      For a given BSON document, all numeric fields are extracted and converted to uint64_t. Timestamps are extracted as two uint64_t, seconds followed by increment. For doubles, NaN is encoded as zero, doubles less than MIN_INT64 are stored as MIN_INT64, and doubles greater than MAX_INT64 are stored as MAX_INT64.

      https://github.com/mongodb/mongo/blob/master/src/mongo/db/ftdc/README.md#extraction

      However, it does not appear that the server's FTDC implementation adheres to this, and will actually attempt to encode a double whose value is infinity as infinity.

        1. screenshot-1.png
          screenshot-1.png
          57 kB
        2. Screenshot 2025-11-03 at 4.11.56 PM.png
          Screenshot 2025-11-03 at 4.11.56 PM.png
          117 kB
        3. Screenshot 2025-11-05 at 4.46.45 PM.png
          Screenshot 2025-11-05 at 4.46.45 PM.png
          51 kB
        4. Screenshot 2025-11-05 at 4.49.34 PM.png
          Screenshot 2025-11-05 at 4.49.34 PM.png
          29 kB
        5. Screenshot 2025-11-05 at 4.52.43 PM.png
          Screenshot 2025-11-05 at 4.52.43 PM.png
          30 kB
        6. Screenshot 2025-11-05 at 4.55.59 PM.png
          Screenshot 2025-11-05 at 4.55.59 PM.png
          154 kB

            Assignee:
            Cole Harbeck
            Reporter:
            Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: