Select to view content in your preferred language

ApplyDeltaAsync giving Update failure

149
1
11-21-2024 04:14 AM
ViktorSafar
Frequent Contributor

Semi-offline WPF app. We sync a local Geodatabase from a version-enabled FeatureServer, with "create new version for each downloaded map" = true (AGE).

I am using REST API calls, not the SDK methods, as I have some special needs.

Situation: 

  • I have created a new gdb by calling /createReplica
  • I edited a feature in default via a web interface (attribute value change)
  • I edited the same feature in my WPF app (geometry change)

When I want to synchronize the local gdb with server, I do

  1. GeodatabaseSyncTask.ExportDeltaAsync() 
  2. call to /uploads/upload with the local delta
  3. call to /synchronizeReplica with 
    1. syncDirection=upload
    2. editsUploadID=ID that I got from the upload
    3. async=true
  4. I poll the job status until completion
  5. call to /versions/{myReplicaVersion}/reconcile
    1. wrapped in start and stop of reading and editing
    2. abortIfConflicts=false
    3. conflictDetection=byAttribute
    4. withPost=true
  6. call to /synchronizeReplica with
    1. syncDirection = download
    2. async=true
  7. I poll the job status until completion
    1. here I get a "remote" delta geodatabase
  8. GeodatabaseSyncTask.ApplyDeltaAsync(gdb, remoteDeltaFile)
    1. here I get "Service error code 3070: Update failure. There are pending edits on the feature. This feature will not be synchronized."

 

I can see my local changes have been applied to default.

I can understand why I am getting the error in point 8. What do I do to make the ApplyDelta work?

0 Kudos
1 Reply
HaraldLund
Emerging Contributor

Hi,

Since this is a local geodatabase, could the reason be that there is a db-lock that indicates editing going on? Maybe the client application has to disconnect from the database.

0 Kudos