Skip to content

Atomicity requirements and partial execution #2101

@HeikoTheissen

Description

@HeikoTheissen

The specification is unclear about atomicity requirements in data modification requests that allow the continue-on-error preference. OData-Protocol, section 11.7.7.5 says

All requests in a change set represent a single change unit so a service MUST successfully process and apply all the requests in the change set or else apply none of them.

and similar wording is used for the other mass updates that allow the continue-on-error preference (delta update, set-based update, and set-based delete) if that preference is not specified.

This does not imply that all changes must happen in one LUW, but leaves open the option of committing individual changes one after the other and rolling them back if necessary. Indeed, the following sentence seems to encourage this:

It is up to the service implementation to 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.

There may therefore be points in time when a client that reads from the service observes a state where one request from a failed change set has been executed. Is there really no guarantee of atomic data modification requests?

And if the continue-on-error preference is specified, can mass updates always be committed one after the other (like in batch requests without change sets)?

In asynchronous batch requests clients can retrieve the partial result of such a "one-after-the-other" execution, although confusingly not in change sets (despite the second-last paragraph). However, nothing is said about partial results for other asynchronous mass updates that allow the continue-on-error preference, except that

Services MAY include a response body, for example, to provide additional status information.

Can such a response also include the partial result of a "one-after-the-other" execution? Or are such non-batch mass updates always executed in a single LUW (even if continue-on-error is applied)?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Open

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions