GeodatabaseSyncTask.ImportGeodatabaseDeltaAsync doesn't catch all edits

07-02-2019 03:08 PM
MVP Regular Contributor

We have a process in place to import deltas generated through another process.  Doing this we are seeing odd behavior in how the things merge.  In situations where in the time between an upload happening from the client and the next delta download edits occur at the server, these changes do not get back to the client that made the edits.


  • User 1 makes edit, creates feature A t0
  • User 1 pushes edit to server using an Upload Sync - feature A is on server at t0
  • User 2 edits feature A on server at t1
  • System generates deltas from t0..
  • User 1 downloads delta file and does Merge

In this scenario user 1 never gets the changes made on the server to the feature she created.  iF i look in the delta database I see the row, but everything is contained in the _Inserts table.

If any other user downloads those deltas the features are created as expected. 

If after that initial delta was generated a new edit is made to feature A and we generate a new delta file the update will process correctly.  Also in this case the delta database contains the edit in an _Update table.

I am not sure where the issue is?  I would think the delta database would recognize that the record had been inserted and updated since the last delta was generated, or the ImportGeodatabaseDeltaAsync would recognize that the row in the _Insert table did not match the same row that was in the offline replica

All I know is that user 1 never gets the update to her feature that was made on the server in the time between upload and generating the delta



0 Kudos
1 Reply
MVP Regular Contributor

I have done some intensive testing on what is happening here and it really defies explanation.

I have uploaded an edit using the Runtime API with direction set to Upload.  I have then through two methods generated a delta file.  I can look at the fiddler logs and see that the rest call to the /synchronizeReplica method is identical.  In one case I am using the Runtime API and the sync completes through whatever process is used internally to the API.  In the second case I download the delta file separately and use the  GeodatabaseSyncTask.ImportGeodatabaseDeltaAsync ‍method the import deltas.

In the case of using the Runtime API changes are imported to the offline edit replica and everything is correct after the sync.  In the case of manually merging deltas the changes do not show up in the edit offline replica.  I have looked at the actual delta file and as far as I can see they are identical.  The only difference is in one case we merge deltas, in the other case the API merges deltas.

As a side not everything works just fine if the if field database has never been edited.  It is only when the field database has been edited that the merge fails.

What is wrong?  How can it not be possible to merge changes in this way? 

Rex Hansen

Michael Branscomb

0 Kudos