-
Type: Task
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Service Arch
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; };
}