-
Notifications
You must be signed in to change notification settings - Fork 2
Implement transaction support for batch requests with POST operations #88
Copy link
Copy link
Open
0 / 10 of 1 issue completedOpen
0 / 10 of 1 issue completed
Copy link
Description
Background
The batch feature in OData v4 allows for complex workflows involving multiple operations within a single request. However, when multiple POST requests (inserts) are included in a batch, it's crucial to ensure that either all operations succeed or the batch is rolled back if any fail, maintaining data integrity.
Task
- Design and implement transaction handling for batch requests containing POST operations.
- Ensure that if any POST operation in a batch fails, all changes from that batch are rolled back to prevent partial insertions.
- Support atomicityGroup/changeset semantics according to OData v4 standards.
- Handle errors correctly (e.g., 424 Failed Dependency when dependencies exist and a parent operation fails).
- Provide appropriate feedback in the batch response for transaction outcomes.
Acceptance Criteria
- POST requests in a batch are executed in an atomic transaction group.
- On failure of one or more POSTs, all requests in the group are rolled back.
- Tests are provided for success, failure, and rollback scenarios.
- The feature is documented (examples, API usage, edge-cases involving nested objects or arrays).
References
- Main tracking issue: Improve batch documentation: Content-ID references, $$ syntax, and atomicityGroup (changeset) support #87
- OData v4 Batch Protocol and atomicityGroup docs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels