Sitecore xDB Sync token is no longer valid for the [Contacts] Table
After execution of the Rebuild index on xDB app service I observed that in SOLR Cloud, the data is not reflected in the xdb_internal collection but is being updated in the xdb_rebuild_internal collection.
I have checked the Application Insight and found the following exception:
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.
Important: Do not use SWAP with a SolrCloud node. It is not supported and can result in the core being unusable. You can find more details here: Does Solr’s SWAP work with SearchStax?
Solution:
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
Hence, it’s important to note that under SolrCloud deployments, such as Searchstax, the CREATEALIAS function is used to achieve the same result as the SWAP operation.
CREATE ALIAS: Create or Modify an Alias for a Collection: The CREATEALIAS action will create a new alias pointing to one or more collections. If an alias by the same name already exists, this action will replace the existing alias, effectively acting like an atomic "MOVE" command.
I have used the following API and swap the SOLR core:
/admin/collections?action=CREATEALIAS&name=name&collections=collectionlist
Example:
https://ss****-********-********-azure.searchstax.com/solr/admin/collections?action=CREATEALIAS&name=xdb&collections=xdb_internal
https://ss****-********-********-azure.searchstax.com/solr/admin/collections?action=CREATEALIAS&name=xdb_rebuild&collections=xdb_rebuild_internal
Happy Sitecoreing 😊
Comments
Post a Comment