1

After rebuilding the xDB search index in SOLR Cloud, the data is not reflecting in the xdb_internal collection but is being updated in the xdb_rebuild_internal collection.

I have checked the Application Insight and found following exception:

*** [xdb_collection.GetContactsChanges], Line 27. Errno 50000: Sync token is no longer valid for [Contacts] table.
System.Data.SqlClient.SqlException at Sitecore.Framework.TransientFaultHandling.Sql.SqlRetryHelper+<>c__DisplayClass8_0`1+<<ExecuteAsync>b__0>d.MoveNext

I have gone through with the following articles and Q/A posted on StackExchange and applied the solution but its not solved yet:

  1. https://doc.sitecore.com/xp/en/developers/103/sitecore-experience-platform/rebuild-the-xdb-index-in-solr.html
  2. Getting exception "Sync token is no longer valid for [Contacts] / [Interactions] table" with xConnect Search Indexer
  3. https://akshaybarve.wordpress.com/2022/05/05/sitecore-xdb-rebuild-index-token-issue/

Sitecore XP Version: 10.3
SOLR Cloud SearchStax
Application has been deployed on Azure PaaS (Sitecore MCS)

2 Answers 2

0

If this is happening in a lower environment where it is okay to clear the xDB data then you could try running the following delete statements:

DELETE FROM [xp0.Collection.Shard0].xdb_collection.ContactIdentifiers
DELETE FROM [xp0.Collection.Shard0].xdb_collection.ContactFacets
 
DELETE FROM [xp0.Collection.Shard0].xdb_collection.Contacts WHERE ContactId not in 
(SELECT ContactId FROM [xp0.Collection.Shard0].xdb_collection.ContactIdentifiers)
 
DELETE FROM [xp0.Collection.Shard0].xdb_collection.InteractionFacets
DELETE FROM [xp0.Collection.Shard0].xdb_collection.Interactions WHERE InteractionId not in 
(SELECT InteractionId FROM [xp0.Collection.Shard0].xdb_collection.InteractionFacets)

Please check this blog for more details: https://getsitecore.wordpress.com/2020/09/22/sitecore-xconnect-sync-token-is-no-longer-valid-error/

However, if this happening in a higher environment and you do not want to lose data from your xDB then you could follow the blog from Robbert: https://www.kayee.nl/2021/09/02/sitecore-xdb-index-token-issue-analysis-from-a-different-angle/

I've tried to explain how this is working here: https://sumitupadhyay.hashnode.dev/sitecore-xconnect-sync-token-is-no-longer-valid-error-part-2

3
0

In regards to the Errno 50000: Sync token is no longer valid for [Contacts] table error, Rebuilding the xDB index in Solr should fix it but regrettably, it could not fix my issue.

Indeed, when rebuilding the xDB index, the rebuild collection will be updated, and you will need to swap the cores to ensure that the newly rebuilt core is active instead of the prior one. This is mentioned in the "Confirm rebuild" part of the documentation.

Therefore, I tried swapping the core mentioned in the Sitecore documentation but unfortunately, it's not working and returning me the error: "Not supported in SolrCloud".

I have gone through the SOLR guide documentation at https://solr.apache.org/guide/solr/latest/index.html and found that the SWAP command does not support a SolrCloud node.

Upon further exploration of the other API options, I found that the CREATEALIAS API might be suitable for addressing my requirement: CREATEALIAS: Create or Modify an Alias for a Collection

See the blog post for more details: Sitecore xDB Sync token is no longer valid for the [Contacts] Table

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.