You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiple runs can refer to resources with the same uid, this means that these runs also share datum, because datum looked up by resource uid. The name uid implies that it is unique.
But if there is not an index enforcing it.... I think there is an index enforcing that the datum_ids in the Datum collection are unique. It is allowed for events from multiple runs to refer to the same datum if they really do share data (the primary driver here is for backgrounds).
This is a bit of an edge case because we want:
runs to be able share references to the same data on disk (primarily for background / calibration reasons)
ensure that all foreign keys are included in the event stream if you jump it at a Start document (so a consumer never has to know what oracle to go to to resolve them)
the Resource and Datum documents to be primarily generated by Ophyd objects (as that is where the knowledge about the file writing lives)
Previously, ophyd objects directly inserted the resource/datum into data broker (which got point 3 and 1). To fix this we changed how those documents got routed, added the collect_asset_docs which fixed point 2 and allowed us to tack the run_start onto the resource documents to make it easier to collect them later without affecting 1 or 3.
There is something nice about having the duplicated Resource documents share a resource uid as that is the key we use to determine if we need another handler and these all should be able to share said handler.
The text was updated successfully, but these errors were encountered: