What should happen if a request to bulk API partially succeeds? Example: We request node ids x, y, and z, but the repository doesn't know y.
What should happen if a request partially fails? Example: We store nodes q, r, s, t, and t as child of both r and s.
Option A: Whole request fails
If any part of the request is unsuccessful, the whole request fails.
Pro:
Con:
- Would need good mechanism to signal which parts failed, e.g. which node id is not known to the repository.
Option B: Request always succeeds, issues are reported back
Pro:
Con:
- We have implicit semantics (e.g. deleting a node implicitly deletes all its children).
A client would need to re-model all implicit semantics to understand the effects of partially successful requests
Option C: Non-modifying requests always succeed, omit missing parts
The first example above would return node x and z.
Pro:
Con:
The client needs to compare request and result to figure out that there's no node with id y.
Option D: Modifying requests partially succeed, omit missing parts
The second example above would store node q, and chose the containment for t that's mentioned inside t.
Pro:
Con:
- Even harder for a client to figure out what actually happened than option B
Option E: Modifying requests completely fails, doesn't change the repository, (reports issues back textually)
If any non-recoverable issue arises during a modifying request, the repository does not apply any changes (or rolls back already applied changes from the same request).
Such an issue is typically a programming error, so the user cannot deal with it. Thus, we don't need a very structured response, but only a hint to the developer.
What should happen if a request to bulk API partially succeeds? Example: We request node ids
x,y, andz, but the repository doesn't knowy.What should happen if a request partially fails? Example: We store nodes
q,r,s,t, andtas child of bothrands.Option A: Whole request fails
If any part of the request is unsuccessful, the whole request fails.
Pro:
Con:
Option B: Request always succeeds, issues are reported back
Pro:
Con:
A client would need to re-model all implicit semantics to understand the effects of partially successful requests
Option C: Non-modifying requests always succeed, omit missing parts
The first example above would return node
xandz.Pro:
Con:
The client needs to compare request and result to figure out that there's no node with id
y.Option D: Modifying requests partially succeed, omit missing parts
The second example above would store node
q, and chose the containment fortthat's mentioned insidet.Pro:
Con:
Option E: Modifying requests completely fails, doesn't change the repository, (reports issues back textually)
If any non-recoverable issue arises during a modifying request, the repository does not apply any changes (or rolls back already applied changes from the same request).
Such an issue is typically a programming error, so the user cannot deal with it. Thus, we don't need a very structured response, but only a hint to the developer.