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

Create a serialization context util function for BSONObj/opCtx

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

      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:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            hugh.tong@mongodb.com Hugh Tong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: