Validate and update (if needed) the TimeseriesMetadata::serialize() obj construction

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, the TimeseriesMetadata::serialize() (see also caller) is written to look like the expected BSONObj output is:

      {
        resolvedView: {
          ...,
        },
        timeseriesOptions: { ... }
      }
      

      However, due to the BSONObjBuilder semantics, the deepest subobj that is open is what gets written to. As a result, the output is actually:

      {
        resolvedView: {
          ...,
          timeseriesOptions: { ... }
        },
      
      }
      

      SERVER-120269 fixes this improper use of the BSONObjBuilder API but this now explicitly encodes the fact that timeseriesOptions is a sub-field of resolvedView.

      We should ensure that the output is what we expect and add some unit testing around this area of code.

      For more context see this PR comment.

      This ticket can be declined if there is no further work needed.

            Assignee:
            Finley Lau
            Reporter:
            Naafiyan Ahmed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: