Javier Montano
Javier Montano

Reputation: 11

How do I unlock a sitecore contact?

I have a CM and a CD server. They share the analytics database. I have a scenario where I update an item through the REST API service directly to the master database, and that triggers a saved item event. In that Event, I am adding the contact to a contact list. To do this I am trying to save the contact (otherwise the change will not be reflected). But Everytime I try to use TryGetContactForUpdate, I get a null contact and the status is LockedByWebCluster.

I tried releasing the contact to XDB before updating the item (on the CD), but the contact is still locked. If I just get the contact and release it, I see the updated Tag with the contact list in Mongo (without a lease), but as soon as I log out from the customer area, the contact will be replaced with the last known version from the CD (with a lease).

I am not completely sure about why all of this is happening or how it is supposed to be, but I assumed that if I unlocked the contact before updating it in the CM I wouldn't get an issue.

To complicate things more, My ClusterName needs to be the same in the CM and the CD, otherwise, the REST API won't work properly. Not sure why.

Any advise?

PS: Using Sitecore 8.1

Upvotes: 1

Views: 330

Answers (1)

Chris Auer
Chris Auer

Reputation: 1445

You cannot unlock the contact. You can only try to gain access on a timer job. This was a big issue with 8.x the model and also why in Sitecore 9 xConnect separates the contact from the site. So there is no locking in xConnect like 9.

Upvotes: 0

Related Questions