SqlSyncChangeTrackingProvider and OnOutdated-Interceptor #1231
-
Hi! I'm using the SqlSyncChangeTrackingProvider on the server side to sync a database to local Sqlite databases and running into the following problem: A record is inserted into a parent table with a corresponding record in a child table and successfully synced to the server database. Another client doesn't sync in time of the CHANGE_RENTATION days with the server and therefore did not get the this parent/child records when he syncs later on. Then another client which is in sync, changes the child record and syncs. If the out of sync client now syncs within the CHANGE_RETENTION days for the change a sync error will be thrown, because it tries to inserts the child row without already having the parent record (FOREIGN KEY constraint failed). So one problem is that after the CHANGE_RETENTION days there could be missing data if a client syncs too late and another problem is that the data is not consitent anymore and probably results in a sync error. I was expecting that the OnOutdated-Interceptor will called if the last sync was too long ago for a client and the database will be completely recreated witht he following code:
But this is not called. Do I miss something beside increasing the CHANGE_RETENTION days on the server? But this only would increase the time frame it works... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 15 replies
-
I think there is a problem with the way the Until you have upgraded your version, you can try to manually update the
Let me know if it's fixing your issue |
Beta Was this translation helpful? Give feedback.
I've made a couple of changes in this commit where I dynamically get the
MAX(CHANGE_TRACKING_MIN_VALID_VERSION)
of all tables, each time I try to get ascope_info
record, that happens every time a sync starts.