1.3.3.1 Concurrent operations on the same resource
The Network Controller allows for concurrent operations on the same resource. Clients of the Network Controller's Northbound Interface have to be aware that concurrent operations from different clients will happen and therefore interactions with the Network Controller have to be developed with this assumption in mind.
Because the Network Controller is a distributed service made up of several services, it handles transient failures internally. It does this by having a retry loop that the Software-Defined Networking API (SDNAPI) service uses for communicating with the other services. The SDNAPI service is the component in the network controller that listens for HTTP/HTTPS web requests, parses them and forwards them on to the appropriate service module for handling. This retry loop will continue retrying the operation several times while keeping the resource in the Updating state. If the operation succeeded, the retry loop will be stopped and the resource will be put in the Succeeded state. If after the retry limit is reached in the retry loop, then the retries will stop and the resource will be put in the Failed state. The Network Controller internally handles asynchronous operations when there aren't concurrent operations on the same resource.
The Network Controller can have only one operation in progress at a time for all resources in a parent-child tree. The rules for concurrent operations on the same resource are as follows:
PUT on top-level resource moves parent and all children (descendants) into Updating state
PUT on top-level resource cancels PUT on itself and any PUT/DELETE on its children (descendants)
DELETE on top-level resource moves top level resource and its entire set of descendants into Deleting state.
DELETE of top-level resources cancels PUT/DELETE on itself and any descendants.
PUT on a descendant resource moves ancestor state to Updating.
PUT on descendant resource cancels PUT on any parent or a PUT on itself. It does not cancel PUT on its sibling.
DELETE of descendant resource moves ancestors to Updating state and itself to Deleting state.
DELETE of descendant resource cancels PUT of ancestors or PUT/DELETE on itself.
For synchronous operations, the only valid states are Failed or Succeeded. The following diagrams show states for synchronous PUT or DELETE operations.

Figure 6: State diagrams for synchronous operations
If an operation cannot cancel another operation in progress on the resource, its child, sibling, or parent, the request is rejected with HTTP code 409 (Conflict) response. The error details are as follows:
Error code: AnotherOperationInProgress
Error message: Another operation on this or dependent resource is in progress. To retrieve the status of the operation, use uri: {0}.
Note PUT or DELETE of descendant resource updates the etag of itself and the ancestors. PUT on top-level resource updates the etags of all descendants.
For more information about how the Network Controller internally handles asynchronous operations, see section 1.3.2.