[SERVER-80549] Make DatabaseNameUtil::de/serialize no longer use default serialization context Created: 30/Aug/23  Updated: 29/Oct/23  Resolved: 25/Sep/23

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

Type: Task Priority: Major - P3
Reporter: Sophia Tan Assignee: Mathis Bessa
Resolution: Fixed Votes: 0
Labels: ntdi_must_have
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-80545 Make DatabaseNameUtil::serialize no l... Closed
Related
is related to SERVER-81300 Refactor ScopedBaseDDLLock to use a N... Backlog
Assigned Teams:
Serverless
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2023-09-18, Server Serverless 2023-10-02
Participants:
Story Points: 3

 Description   

The DatabaseNameUtil::deserialize function has a default argument SerialziationContext.
 

static DatabaseName deserialize( boost::optional<TenantId> tenantId, StringDatadb,  const SerializationContext& context = SerializationContext::stateDefault());

In this ticket, we will remove the default value from it. The motivation is to enforce each call site pass in the correct serialization context. 



 Comments   
Comment by Githook User [ 25/Sep/23 ]

Author:

{'name': 'Mathis Bessa', 'email': 'mathis.bessa@mongodb.com', 'username': 'mathisbessamdb'}

Message: SERVER-80549 Make DatabaseNameUtil::de/serialize no longer use default serialization context
Branch: master
https://github.com/mongodb/mongo/commit/67ba9db8c11939149c600a283bf38514502ccbaf

Comment by Sophia Tan [ 31/Aug/23 ]

We need to pass an appropriate context when it’s provided or replace it with StateDefault when there is none to preserve the current behavior. 

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