Sitefinity CMS 5.3 and above uses a database performance optimization technique known as incremental/sequential GUIDs. Incremental GUIDs have better performance, but, if used without some precautions, they can endanger data integrity when you are performing synchronization or replication.
Incremental GUIDs are generated by increasing a base GUID using a deterministic algorithm. This means that if you have the same base GUID on two servers, you may end up generating two identical IDs for two distinct objects, created independently on the two servers. This can lead to data corruption or data loss, if you try to synchronize them. You can end up having the same base GUID on two different servers, by restoring a database backup of the first one as the database of the second one, because the base GUID is kept in the database.
When you use Site Sync to copy, for example, your development database to your staging environment, you can cause data integrity issues. To solve this, Sitefinity CMS introduces the concept of a site key, which is a unique number between 0 and 100 among all the servers that participate in some kind of synchronization between each other. If you think of your site stages (development, staging, production, etc.) as a network of connected servers, each of them must have a unique key in that network.
The site key participates in the incremental GUID generation algorithm ensuring that any GUID generated with one site key is different from any GUID generated with any other key. Thus, items created on your development server have IDs that are guaranteed to be different from the IDs of the items created in parallel on your staging server, which guarantees that no ID clashes during synchronization.
IMPORTANT: To avoid data corruption or data loss, every time you restore a database backup from the previous stage, for example development to test environment or test to production environment, you must set a unique site key, immediately (before creating new content) after restoring the database. Otherwise, you allow a period of time during which both servers can generate identical IDs for different objects.
Back To Top
Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.