RollbackOnFailure and sync models

Sync models

The sync model defines how layers can be synced. When creating a replica, clients can choose one of the following sync models by setting the syncModel parameter:

The feature server’s syncCapabilities property describes the supported sync models.

"syncCapabilities": {
"supportsPerLayerSync": true,
"supportsPerReplicaSync": true,
    
}

For example, if supportsPerLayerSync is true and supportsPerReplicaSync is false, you can choose only a perLayer sync model when running the create replica operation.

If supportsPerLayerSync is not provided, it's false by default.

If supportsPerReplicaSync is not provided, it's true by default.

RollbackOnFailure

When synchronizing, clients can set the rollbackOnFailure parameter. RollbackOnFailure determines the behavior when there are errors while importing edits on the server during synchronization. This only applies in cases where clients are uploading edits to the server.

RollbackOnFailure can be set as follows:

The feature server’s syncCapabilities property determines if the synchronizeReplica operations rollbackOnFailure parameter is supported.

"syncCapabilities": {
"supportsRollbackOnFailure", <true | false>

},

If the supportsRollbackOnFailure property is true, you can set the rollbackOnFailure parameter to true or false when running the synchronizeReplica operation.

If the supportsRollbackOnFailure property is false, the synchronizeReplica operation does not support the parameter.

When supportsRollbackOnFailure is false and only a perLayer sync model is supported ("supportsPerLayerSync":true and "supportsPerReplicaSync": false), synchronizeReplica always applies the rollbackOnFailure = false behavior above.

When supportsRollbackOnFailure is false and only a perReplica sync model is supported ("supportsPerLayerSync": false and "supportsPerReplicaSync": true), synchronizeReplica always applies the rollbackOnFailure = true behavior above.

For information on how to handle errors during sync, see Error handling with sync operations.

Supported rollbackOnFailure behavior and sync models

The following table lists the supported syncModels and rollbackOnFailure behavior with ArcGIS Server:

Data source

rollbackOnFailure=True

rollbackOnFailure=False

PerLayer syncModel

PerReplica syncModel

Non-versioned data

No

Yes

Yes

No

Versioned data

Yes

No

No

Yes