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

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.8.0
    • Affects Version/s: 4.4.0
    • Component/s: Logging
    • Fully Compatible
    • Query 2020-10-05

      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.

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

              Created:
              Updated:
              Resolved: