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

In at least one instance (4615603), log index keys as strings instead of deflated JSON

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • 4.4.0
    • 4.8.0
    • Logging
    • Fully Compatible
    • Query 2020-10-05

    Description

      Downstream consumers of structured logs could have problems persisting/rendering log line 4615603, and potentially others.

      The convention of logging index keys as Extended JSON with deflated key names (e.g., { "": "valueA", "": "valueB" } in index {a:1, b:1}) will probably lead many consumers to receive a single-field document with only the last value (e.g., { "": "valueB" }) unless they introduce special handling.

      To be clear, we do log the index key correctly. It is just in a convention that many clients will readily mangle.

      At a minimum, can log line 4615603 log attr.indexKeyData.key as a string instead of Extended JSON? There may be a more generic solution that fixes all log lines impacted, but it is yet unclear how many log lines are impacted.

      Attachments

        Issue Links

          Activity

            People

              eric.cox@mongodb.com Eric Cox (Inactive)
              eric.sedor@mongodb.com Eric Sedor
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: