Uploaded image for project: 'Opencast'
  1. MH-12641

Asset manager conflict checks are very slow

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed and reviewed
    • Affects versions: 4.0
    • Fix versions: 4.1
    • Components: Backend Software

      Description

      Conflict checks produce very slow queries from the asset manager, for example:

      SELECT t0.id, t0.archival_date, t0.availability, t0.mediapackage_id, t0.mediapackage_xml, t0.organization_id, t0.owner, t0.series_id, t0.version, t1.id, t1.val_bool, t1.val_date, t1.val_long, t1.mediapackage_id, t1.namespace, t1.property_name, t1.val_string FROM mh_assets_snapshot t0 LEFT OUTER JOIN mh_assets_properties t1 ON (((t1.mediapackage_id = t0.mediapackage_id) AND ((t1.namespace = 'org.opencastproject.scheduler') AND (t1.property_name = 'start'))) OR ((t1.mediapackage_id = t0.mediapackage_id) AND ((t1.namespace = 'org.opencastproject.scheduler') AND (t1.property_name = 'optout')))) WHERE ((((((t0.organization_id = 'mh_default_org') AND EXISTS (SELECT 1 FROM mh_assets_properties t2 WHERE ((t0.mediapackage_id = t2.mediapackage_id) AND (t2.namespace = 'org.opencastproject.scheduler'))) ) AND ((NOT EXISTS (SELECT 1 FROM mh_assets_properties t3 WHERE (((t0.mediapackage_id = t3.mediapackage_id) AND (t3.namespace = 'org.opencastproject.scheduler.trx')) AND (t3.property_name = 'transaction_id'))) AND (t0.version = (SELECT MAX(t4.version) FROM mh_assets_snapshot t4 WHERE (t4.mediapackage_id = t0.mediapackage_id)))) OR (EXISTS (SELECT 1 FROM mh_assets_properties t5 WHERE (((t0.mediapackage_id = t5.mediapackage_id) AND (t5.namespace = 'org.opencastproject.scheduler.trx')) AND (t5.property_name = 'transaction_id'))) AND EXISTS (SELECT 1 FROM mh_assets_properties t6 WHERE ((((t0.mediapackage_id = t6.mediapackage_id) AND (t6.namespace = 'org.opencastproject.scheduler')) AND (t6.property_name = 'version')) AND (t0.version = t6.val_long))) ))) AND EXISTS (SELECT 1 FROM mh_assets_properties t7 WHERE ((((t0.mediapackage_id = t7.mediapackage_id) AND (t7.namespace = 'org.opencastproject.scheduler')) AND (t7.property_name = 'agent')) AND (t7.val_string = 'nlt'))) ) AND EXISTS (SELECT 1 FROM mh_assets_properties t8 WHERE ((((t0.mediapackage_id = t8.mediapackage_id) AND (t8.namespace = 'org.opencastproject.scheduler')) AND (t8.property_name = 'start')) AND (t8.val_date >= '2018-09-19 10:00:00'))) ) AND EXISTS (SELECT 1 FROM mh_assets_properties t9 WHERE ((((t0.mediapackage_id = t9.mediapackage_id) AND (t9.namespace = 'org.opencastproject.scheduler')) AND (t9.property_name = 'start')) AND (t9.val_date <= '2018-09-19 10:50:00'))) )

        TestRail: Results

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                smarquard Stephen Marquard
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  TestRail: Cases