FHIR Chat · Batch interdependencies · implementers

Stream: implementers

Topic: Batch interdependencies


view this post on Zulip Eero Kelly (Jul 09 2019 at 20:41):

Are batches with interdependencies considered non-conformant as a whole or does this refer to the individual operations within a batch?
It's not clear if a dependency causes the batch to not process and return a 4xx or 5xx, or return a 200 with internal errors on operations with dependencies.
https://www.hl7.org/fhir/http.html#brules

view this post on Zulip Grahame Grieve (Jul 10 2019 at 22:56):

depends. what happens when the server processes the operations one at a time?

view this post on Zulip Grahame Grieve (Jul 10 2019 at 22:57):

as if you submitted them independently

view this post on Zulip Grahame Grieve (Jul 10 2019 at 22:57):

some interdependencies would work out ok, but others would not

view this post on Zulip Eero Kelly (Jul 11 2019 at 00:39):

That seems to go against "For a batch, there SHALL be no interdependencies between the different entries in the Bundle that cause change on the server." It sounds like any interdependencies are not okay.

For example, say a resource is created and updated in the same batch, we fail them both internally because "The success or failure of one change SHOULD not alter the success or failure or resulting content of another change." But in doing so, we're failing one change based on another change, which itself seems to go against the rule. It looks like the best option would be to fail processing the bundle as a whole for being a bad batch for having the interdependencies in the first place.

view this post on Zulip Grahame Grieve (Jul 11 2019 at 12:19):

well, I guess we could be clearer in the wording there - we're really saying that the kind of interdependencies that a transaction caters for aren't supported. But you could post a resource that references another, and then put the other resource ... that could be descibred as an 'interdepedency' but isn't in the same sense

view this post on Zulip Lloyd McKenzie (Jul 11 2019 at 15:05):

I thought batch entries could be processed out of order or in parallel?

view this post on Zulip John Moehrke (Jul 11 2019 at 16:22):

I was expecting the difference between Transaction and Batch had more to do with success than to do with what is allowed to be placed into them. That is to say that a Transaction must succeeded totally or fail totally; where as Batch is allowed to partially succeed. Seems the interdependencies within should be just as complex or simple. The processing flow is defined the same for both.

view this post on Zulip Grahame Grieve (Jul 11 2019 at 20:24):

the interdependencies depend on the integrity

view this post on Zulip Lloyd McKenzie (Jul 12 2019 at 15:29):

Does Batch presume in-order sequential processing @Grahame Grieve?

view this post on Zulip John Moehrke (Jul 12 2019 at 17:46):

This from the spec in the Batch section http://build.fhir.org/http.html#brules
" Note that it is considered that servers execute the batch in the same order as that specified below for transactions, though the order of execution should not matter given the previous rule"

view this post on Zulip Lloyd McKenzie (Jul 13 2019 at 23:38):

If order shouldn't matter, then referencing something created in the same batch sounds like an error.

view this post on Zulip Alexander Kiel (Jul 15 2019 at 09:08):

The transaction order also puts all reads after all writes. Does that mean that in both cases (batch and transaction) all reads see all writes? At least that would mean that the order of execution for reads and writes does matter.

view this post on Zulip Grahame Grieve (Jul 26 2019 at 20:22):

Note that it is considered that servers execute the batch in the same order as that specified below for transactions

I don't remember writing that, and that's not how my implementation works


Last updated: Apr 12 2022 at 19:14 UTC