-
Type: Task
-
Resolution: Won't Do
-
Priority: 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*);