Refactor 'explain' output from serialize() and serializeToArray() methods in DocumentSource subclasses

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The serialize() and serializeToArray() methods of DocumentSource subclasses are used for too many purposes (and therefore could be quite complex):

      • serializing pipeline stage for logging
      • serializing pipeline stage for explain command output
      • serializing pipeline stage for cloning or sending over the wire
      • serializing pipeline stage for query shape hash computation

      We can refactor explain-relevant parts into separate methods which can enrich the general-purpose serialization results with additional information. Doing this will make it more obvious:

      • which information is needed by solely by explain and
      • when this information is needed within the DocumentSource instance lifecycle

            Assignee:
            Unassigned
            Reporter:
            Daniel Tabacaru
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: