dcm4che / dcm4chee-arc-light

DICOM Archive J2EE application
439 stars 242 forks source link

Simplify query for Studies for deletion on cache storage used by multiple permanent storages #4573

Closed gunterze closed 1 month ago

gunterze commented 1 month ago

Simplify query for Studies for deletion on cache storage used by multiple permanent storages, if it can be assumed, that all objects of a single Study will be exported to the same permanent storage, so objects of one Study does not get distributed over several Export Storages.

Configurable by Storage Attribute

Name Type Description (LDAP Attribute)
Single Export Storage by Study boolean Indicates that objects of one Study are NOT distributed over several Export Storages.
(dcmSingleExportStorageByStudy)

which reduces the number of possible values for field study,storage_ids for studies with objects on the cache storage for deletion significantly.

E.g. with

Cache Storage ID: C1 Export Storage IDs: E1, E2, E3

the predicate in the WHERE clause will be simplified from

FROM study WHERE storage_ids IN ( 
  'C1\E1',
  'C1\E2',
  'C1\E3',
  'C1\E1\E2',
  'C1\E1\E3',
  'C1\E2\E3',
  'C1\E1\E2\E3' )

to

FROM study WHERE storage_ids IN ( 
  'C1\E1',
  'C1\E2',
  'C1\E3' )

by configuring Single Export Storage by Study: true .