To answer your question, if you remove custom facets model DLL and model JSON from all roles, it will not remove custom facets data for existing customers in shard DBs. For the new customers, these facets will not be applicable. So technically, this will not impact anything for existing or new customers.
But these redundant facets values are increasing the shard DB size and will impact indexer performance. To prevent these situations, you can consider removing custom facets data for all existing contacts in XDB. Unfortunately, I am not aware of anything to remove complete Facets from the contact in XDB, so just explaining how you can remove the attributes from those custom facets:
- First of all, in your custom facet model class remove all the attributes and build the DLL.
public class CustomFacetClass: Facet
public const string DefaultFacetKey = "CustomFacetKey";
- Serialize the collection model in which you defined your custom facet model and deploy the generated JSON file to all required roles. This json will not have any attributes just class, namespace or facet names.
- Now create a utility to update/remove the redundant facets data in XDB.
- To do that, gets contacts from xDB in batches of 200 and then just set the empty facet values to custom facet.
// write logic to get all contacts from XDB
// iterate through the contact, set the facet and submit back contacts to xdb using batching process
foreach(var contact in allXDBContacts)
var CustomFacet = contact.GetFacet<CustomFacetKey>(CustomFacetKey.DefaultFacetKey);
- After running this for all xDB contacts, check the existing contacts in shard DBs, they will still have the custom facets but no facets data for them.