[SERVER-76853] Avoid recreating a NamespaceString object from ns string in logging Created: 04/May/23  Updated: 22/May/23  Resolved: 22/May/23

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

Type: Task Priority: Major - P3
Reporter: Sophia Tan Assignee: Sophia Tan
Resolution: Duplicate 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-65920 Remove NamespaceString ctors with def... Closed
Assigned Teams:
Serverless
Sprint: Server Serverless 2023-05-29
Participants:
Story Points: 1

 Description   

Today, in the logWriteConflictAndBackoff, it recreates a NamespaceString object from the input parameter "StringData ns". It's not reasonable for some reasons:

  1. the "ns" is already a string for logging. Recreating a NamespaceString object from it is wasting the cpu/memory.
  2. the call patch of it can pass in not only a ns string but also a UUID string (eg, here). It's not reasonable to create a NamespaceString object from a UUID string. 
  3. the 'NamespaceString(ns)' function will be removed by SERVER-65920.

In this ticket, we'll log the ns directly, for example,

 "namespace"_attr = ns



 Comments   
Comment by Sophia Tan [ 22/May/23 ]

This task has already been covered by SERVER-65920 in which the NamespaceString constructor with ns string will be removed.

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