[SERVER-75276] writeConflictRetry should properly be using a NamespaceString instead of a StringData Created: 24/Mar/23  Updated: 29/Oct/23  Resolved: 15/May/23

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

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

Issue Links:
Depends
depends on SERVER-76897 Add toStringForLogging function to Na... Closed
is depended on by SERVER-74490 Change NamespaceString::ns() to be pr... Closed
Related
related to SERVER-74485 Always include tenant in db name attr... Closed
Assigned Teams:
Serverless
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2023-05-15, Server Serverless 2023-05-29
Participants:
Story Points: 2

 Description   

There is a few places in the code (such as here and here ) that are using a dbName instead of a NamespaceString name.

We should update writeConflictRetry to properly pass a NamespaceString object.



 Comments   
Comment by Githook User [ 15/May/23 ]

Author:

{'name': 'Sophia Tan', 'email': 'sophia_tll@hotmail.com', 'username': 'sophiatll'}

Message: SERVER-75276 writeConflictRetry should properly be using a NamespaceStringOrUUID instead of a StringData
Branch: master
https://github.com/mongodb/mongo/commit/6be86d8987dbad1c33160ef1779b598bc7cfa6b4

Comment by Sophia Tan [ 04/May/23 ]

Here is another important motivation to change the "StringData ns" to NamespaceString object. This ns is used for logging. With an ns or nsOrUUID object, we can always include the tenant id into log file for writeConflictRetry in one code place.

Comment by Sophia Tan [ 04/May/23 ]

A few places (eg, here) are passing the NamespaceStringOrUUID. We need also to update writeConflictRetry to pass a NamespaceStringOrUUID object too.

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