bluesky: why datum document does not have uid?
Working to update the SpecFileWriter() to be compatible with AreaDetector and new (since 2017-09) API. Found two new documents in the stream from bp.count(): resource and datum.
Expected Behavior
expect to find a uid in every document emitted from RunEngine
Current Behavior
uid is MIA
Possible Solution
Ensure uid is added to all documents emitted by RunEngine.
Steps to Reproduce (for bugs)
See https://github.com/BCDA-APS/APS_BlueSky_tools/issues/29
Context
Trying to solve one problem and this came up.
Your Environment
‘OPHYD_VERSION’: ‘1.2.0’, ‘BLUESKY_VERSION’: ‘1.3.3’ arch = linux_x86-64
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 22 (19 by maintainers)
I agree with https://github.com/NSLS-II/bluesky/issues/1070#issuecomment-405708492 as well. Making mongodb produce the UUID seems attractive but would not solve the original problem. It also makes this document type dependent on the databroker backend.
The discussion has been good to identify the basic motivations for the current implementation. Summarizing:
datum_idwas optimized for low overhead, based on a common UUID and an incrementing integeruidwould cause problemsdatumdocument introduces overhead, perhaps unacceptabledatum_idintouidto maintain a common document schema seems wastefulHaving agreed to keep the current implementation, I could close this issue without further action. Agree?
In my view, putting the same value in two places is slightly worse than dealing with the inconsistency in names, especially since datum_id is already different than the others due to its
uuid4/intstructure and will have to be handled specially by some consumers anyway. But I do not feel strongly about this.