[SERVER-81110] Create a serialization context util function for BSONObj/opCtx Created: 15/Sep/23  Updated: 13/Nov/23  Resolved: 13/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Hugh Tong (Inactive) Assignee: Backlog - Service Architecture
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Service Arch
Participants:

 Description   

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*);



 Comments   
Comment by Didier Nadeau [ 13/Nov/23 ]

Won't do because we're removing SerializationContext.

Generated at Thu Feb 08 06:45:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.