Are you losing your xDB data?
If you are on Sitecore 9.0 to 9.1.1, and you have no patches, then I am afraid that you are losing data. Here is how you can find out if you are losing data.
If you are on Sitecore 9.0 to 9.1.1, and you have no patches, then I am afraid that you are losing data. Here is how you can find out if you are losing data.
In you Sitecore logs, you should see this error
ERROR General error when submitting contact. Exception: Sitecore.XConnect.Operations.FacetOperationException Message: Operation #0, AlreadyExists, <ContactId>, Classification Source: Sitecore.Xdb.Common.Web
In your xConnect logs, you should see this error.
2020-01-28 00:01:34.128 -05:00 [Error] Sitecore.XConnect.Operations.SetFacetOperation`1[Sitecore.XConnect.Facet]: Sitecore.XConnect.Operations.FacetOperationException: Operation #0, AlreadyExists, Contact {e7bda76f-857d-0000-0000-05a15ad3ace7}, Classification
2020-01-28 00:01:34.128 -05:00 [Error] ["XdbContextLoggingPlugin"] XdbContext Batch Execution Exception
Sitecore.XConnect.Operations.FacetOperationException: Operation #0, AlreadyExists, Contact {e7bda76f-857d-0000-0000-05a15ad3ace7}, Classification
These errors are a known issue in Sitecore. You need to install this patch
BUT, you can still experience these errors even with this patch install. If you have this content delivery setup:
- More than one CD server
- A load balancer
- Have shared session state and private session state both inProc. Meaning not in Redis, Mongo or SQL
The reason for this is that if you have more than one CD server, behind a load balancer. Whenever the client switches from one server to another (via the load balancer or switching devices) the session is lost. What is also lost is the reference to the contact. So the new session tries to save the contact and the error is generated.
The way to resolve this, is to move shared and private session to Redis, SQL or Mongo.
Redis
MsSQL
NOTE, this will not work in Azure SQL. SQL session scripts require the temp database. Azure SQL does not have a temp database.