Study FAQ
How do I handle deletions and expired tokens in a Dataverse synchronization?
Also asked as 2
- How can a Dataverse sync process apply deletion records and recover missing deletes after a token expires?
- How should a Dataverse projection reconcile tombstones and stale rows after a change tracking rebuild?
Answer
Apply deletion records by their stable source identity. If the Dataverse change tracking token is missing or too old, rebuild a complete baseline and reconcile it with the destination. A fresh initial read supplies the source's current records. It cannot identify which destination projections correspond to rows deleted before initialization. Dataverse change tracking
Map each tombstone to the same destination identity that an ordinary row uses, such as source environment plus row GUID. Apply the agreed deletion policy, which can remove an expendable projection or mark it unavailable if local history must be retained. If there is no destination row, record that the intended result is already satisfied and leave it absent. Infer deletion from a tombstone or a controlled complete comparison, never from missing optional fields or an absent row on one page. Change tracking deletion constraints · Dataverse alternate keys
After token loss, build a new generation, finish all pages and compare source identities against the destination rows owned by that stream. Confirm access, mapping consistency and complete traversal before any destructive cleanup. A controlled pause in source writes can provide a stable comparison. With writers active, design and test a protocol that accounts for changes during reconciliation. Commit the new generation only after required outcomes are durable. Test a repeated deletion and an expired-token restart with a stale target-only row. Track checkpoint age against the environment's configured retention. Dataverse change retention and retrieval
Full explanation
AB-400: Synchronizing Dataverse with Change Tracking and Upsert
Study guide · AB-400
Read the full explanation