Skip to content

Commit

Permalink
Merge branch 'tickets/DM-43472'
Browse files Browse the repository at this point in the history
  • Loading branch information
kfindeisen committed Mar 23, 2024
2 parents fdb5404 + 254e553 commit 7079183
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions python/activator/middleware_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1201,21 +1201,24 @@ def _export_subset(self, exposure_ids: set[int],
# Transferring governor dimensions in parallel can cause deadlocks in
# central registry. We need to transfer our exposure/visit dimensions,
# so handle those manually.
for dimension in ["exposure",
for dimension in ["group",
"exposure",
"visit",
# TODO: visit_* are not needed from version 4; remove when we require v6
"visit_definition",
"visit_detector_region",
"visit_system",
"visit_system_membership",
]:
for record in self.butler.registry.queryDimensionRecords(
dimension,
where="exposure in (exposure_ids)",
bind={"exposure_ids": exposure_ids},
instrument=self.instrument.getName(),
detector=self.visit.detector,
):
self.central_butler.registry.syncDimensionData(dimension, record, update=False)
if dimension in self.butler.registry.dimensions:
for record in self.butler.registry.queryDimensionRecords(
dimension,
where="exposure in (exposure_ids)",
bind={"exposure_ids": exposure_ids},
instrument=self.instrument.getName(),
detector=self.visit.detector,
):
self.central_butler.registry.syncDimensionData(dimension, record, update=False)
transferred = self.central_butler.transfer_from(self.butler, datasets,
transfer="copy", transfer_dimensions=False)
if len(transferred) != len(datasets):
Expand Down

0 comments on commit 7079183

Please sign in to comment.