DeviceProfile conflict exception

  • An exception can occur when two sessions of the same contact are expired at the same time. If this happens, device data is saved to the database by the first session and cannot be saved by the second one because the concurrency token was already updated. The following exception is written to the log file:

    11:53:44 ERROR PostSessionEndPipeline failed.
    Exception: Sitecore.XConnect.Operations.EntityOperationException
    Message: Operation #0, Conflict, DeviceProfile {c8b3cd10-631e-4c0d-9efe-53e8b7a1b97b}
    Source: Sitecore.Xdb.Common.Web
       at Sitecore.Xdb.Common.Web.Synchronous.SynchronousExtensions.SuspendContextLock[TResult](Func`1 taskFactory)
       at Sitecore.XConnect.Client.XConnectSynchronousExtensions.SuspendContextLock(Func`1 taskFactory)
       at Sitecore.Analytics.XConnect.DataAccess.XConnectDataAdapterProvider.<>c__DisplayClass25_0.<savedevice>b__1(IXdbContext xdbContext)
       at Sitecore.Analytics.XConnect.DataAccess.XConnectDataAdapterProvider.<>c__DisplayClass31_0.<executewithexceptionhandling>b__0(IXdbContext c)
       at Sitecore.Analytics.XConnect.DataAccess.XConnectDataAdapterProvider.ExecuteWithExceptionHandling[T](Func`2 func)
       at Sitecore.Analytics.XConnect.Diagnostics.PerformanceCounters.OperationPerformanceMonitorExtensions.<>c__DisplayClass1_0.<monitor>b__0()
       at Sitecore.Analytics.XConnect.Diagnostics.PerformanceCounters.OperationPerformanceMonitorExtensions.Monitor[T](OperationPerformanceMonitorBase monitor, Func`1 operation)
       at Sitecore.Analytics.XConnect.DataAccess.XConnectDataAdapterProvider.SaveDevice(DeviceData deviceData)
       at Sitecore.Analytics.DataAccess.Dictionaries.AverageCounterExtensions.<>c__DisplayClass1_0.<measuremilliseconds>b__0()
       at Sitecore.Analytics.DataAccess.Dictionaries.AverageCounterExtensions.MeasureMilliseconds[T](AverageCounter counter, Func`1 func)
       at Sitecore.Analytics.DataAccess.Dictionaries.ReferenceDataDictionary`2.Put(TValue value)
       at Sitecore.Analytics.Pipelines.SubmitSessionContext.SaveDevice.Process(SubmitSessionContextArgs args)

Applies to:

CMS 9.0 Initial Release - 9.2 Initial Release

CMS 9.3 Initial Release

March 19, 2019
November 28, 2019

Reference number:

203066