Create a serialization context util function for BSONObj/opCtx

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There are many call sites where we manually build serialization context objects and enumerate the VTS, which isn't intuitive.  Some of these sites also have access to the raw BSONObj, which may contain an extractable expectPrefix field.  Rather than performing these operations manually, we should encapsulate them into a util function that will simply take an opCtx and/or BSONObj and returns a partially completed serialization context object with minimal background knowledge.  For example:

       

      SerializationContext SerializationContext::getPartialSerializationContext(OperationContext*, BSONObj&);
      SerializationContext SerializationContext::getPartialSerializationContext(OperationContext*);

            Assignee:
            [DO NOT USE] Backlog - Service Architecture
            Reporter:
            Hugh Tong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: