Skip to content

Eventual Consistency

Nature of the system

The File Service system implements an eventual consistency approach to optimize performance and maximize read throughput. As a result, it is possible that after data a write operation, retrieval operations may not immediately reflect the most recent updates. This behavior is inherent to the eventual consistency model employed by the system. Consistency across all copies of data is usually reached within a second.

Types of operations

File service will return different responses based on the operation it performs.

Synchronous Operations

Synchronous operations provide immediate results. These are typically operations that act on a single resource and have no impact on other resources. For example, creating or updating the metadata on a folder or file.

Synchronous operations return a 2xx response code and when appropriate, the response body will contain the target resource.

Partially Asynchronous Operations

Many operations in the File Service are a combination of synchronous and asynchronous operations. These are typically operations that act on a resource that has related resources that are impacted when the resource is modified.

In these cases, the explicitly specified resource that was acted on is updated synchronously and the related resources are updated asynchronously.

For example, when deleting a folder, the folder is marked as deleted immediately while an asynchronous job is created to ensure all of the folder’s children are marked as deleted.

Partially asynchronous operations will return a 202 status code. The response body will contain the resource that was modified and the location response header will include the job id for the asynchronous activity.

Many operations can be synchronous or partially asynchronous depending on the situation. For example, deleting an empty folder would be synchronous while deleting a folder with children would be partially asynchronous.

Please refer the below table for the list of operations and their types.

Resource Operation Type
SPACE Create Synchronous
Update
Manage access
Delete If empty: synchronous
If has contents: partially asynchronous
Restore
FOLDER Create Synchronous
Update
Manage access
Move If empty: synchronous
If has contents: partially asynchronous
Copy
Rename
Delete
Restore
FILE Update Synchronous
Manage access
Rename
Move Without support files: synchronous
With support files: partially asynchronous
Delete
Restore
Copy