-
Notifications
You must be signed in to change notification settings - Fork 3
Define atomicity #2107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Define atomicity #2107
Conversation
@@ -13,6 +13,18 @@ the [`return`](#Preferencereturnrepresentationandreturnminimal) preference. | |||
A [success response](#SuccessResponses) indicates that data have been modified, | |||
regardless of whether the requested content could be returned. | |||
|
|||
Data modification requests guarantee _atomicity_ in the following sense: | |||
When the request completes successfully, every subsequent request observes a state of the system |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove "successfully"
When the request completes successfully, every subsequent request observes a state of the system | |
When the request completes, every subsequent request observes a state of the system |
while the data modification request is still being executed. | ||
|
||
A transactional service is a service that protects against seeing such partial changes. | ||
But for services that do not require this degree of transactional consistency, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But for services that do not require this degree of transactional consistency, | |
For services that do not require this degree of transactional consistency, |
@@ -1287,6 +1299,9 @@ If an individual change fails due to a failed dependency, it MUST be | |||
annotated with the term [`Core.DataModificationException`]($$$OData-VocCore$$$#DataModificationException) and SHOULD specify | |||
a `responseCode` of `424` ([Failed Dependency](#ResponseCode424FailedDependency)). | |||
|
|||
Regardless of the `continue-on-error` preference, the collection update must happen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Continue-on-error necessarily means non-atomic. Atomicity means all or none of the user's intent is carried out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the absence of continue-on-error, the operation must complete in an atomic manner.
a state of the system where the changes have been carried out only partially | ||
while the data modification request is still being executed. | ||
|
||
A transactional service is a service that protects against seeing such partial changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might have to have a better term than "Transactional" -- a transactional service may have different isolation levels.
Data modification requests guarantee _atomicity_ in the following sense: | ||
When the request completes, every subsequent request observes a state of the system | ||
in which either all or none of the changes have been carried out. | ||
But depending on how a service makes this guarantee, clients MAY observe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But depending on how a service makes this guarantee, clients MAY observe | |
Depending on how a service makes this guarantee, clients MAY observe |
a state of the system where the changes have been carried out only partially | ||
while the data modification request is still being executed. | ||
|
||
If required, services can offer an isolation level that protects against seeing such partial changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If required, services can offer an isolation level that protects against seeing such partial changes. | |
Where required, services can offer an isolation level that protects against seeing such partial changes. |
For services that do not require this degree of transactional consistency, | ||
it is up to the service implementation to define rollback semantics to undo any changes that | ||
may have been applied before another change failed and thereby guarantee this all-or-nothing requirement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For services that do not require this degree of transactional consistency, | |
it is up to the service implementation to define rollback semantics to undo any changes that | |
may have been applied before another change failed and thereby guarantee this all-or-nothing requirement. | |
It is up to the service implementation to rollback any changes that may have been applied before another change failed and thereby guarantee this all-or-nothing requirement. |
a state of the system where the changes have been carried out only partially | ||
while the data modification request is still being executed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a state of the system where the changes have been carried out only partially | |
while the data modification request is still being executed. | |
a state of the system where the changes have been carried out only partially | |
while the data modification request is still being executed, including changes that may later be rolled back. |
atomicity group or else apply none of them (atomicity in the sense of | ||
[#OData-Protocol#Atomicity]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
atomicity group or else apply none of them (atomicity in the sense of | |
[#OData-Protocol#Atomicity]). | |
atomicity group or else apply none of them. See [#OData-Protocol#Atomicity] for details on visibility of atomic changes. |
define rollback semantics to undo any requests within a change set that | ||
may have been applied before another request in that same change set | ||
failed and thereby apply this all-or-nothing requirement. The service | ||
or else apply none of them (atomicity in the sense of [section ##Atomicity]). The service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or else apply none of them (atomicity in the sense of [section ##Atomicity]). The service | |
or else apply none of them. See [#OData-Protocol#Atomicity] for details on visibility of atomic changes. The service |
Fixed #2101