[SERVER-77520] Refactor fail points which use namespace in its data Created: 26/May/23  Updated: 30/May/23  Resolved: 30/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: Backlog - Service Architecture
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Service Arch
Participants:

 Description   

Refactor fail points which use namespace in its data.

  • Make all fail points to use same field name for namespace. Today, they are using different names, such as "ns", "nss", "namespace", etc.
  • Create a helper function to match namespace for fail point. For example,  
    /** * Requires the data and `target` referent have lifetimes * that enclose the lifetime of the returned predicate. */inline auto makeFailPointPredicate(const NamespaceString& target) { return [&target](const BSONObj& data) { auto nss = NamespaceStringUti::parseFailPointData(data, "namespace"); return nss.isEmpty() || nss == target; }

    ;
    }



 Comments   
Comment by Phoebe Du [ 30/May/23 ]

The Serverless team can feel free to take on this issue as Service Arch don't think it is a priority right now and we'll not realistically ever get to it 

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