Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-19936

Docker _upload dir cleanup uses inefficient query

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: 4 - Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 7.0.0, 6.17.0
    • Component/s: None
    • Labels:
    • Severity:
      Medium

      Description

      Docker cleanup is triggered after manifest deployment and uses the following query:

      select distinct  n.repo as itemRepo,n.node_id as itemId,n.node_path as itemPath,n.node_name as itemName,n.node_type as itemType from  nodes n where ( n.repo = 'jfrog-docker' and n.depth >= 4 and( n.node_path like 'x/y/_uploads%' escape '^' or n.node_path = 'x/y/_uploads')and n.node_type = 1);

      While Artifactory has the {{_upload }}dir location and and since all the files are written directly to the root of the {{_upload }}dir, the >= can be replaces with = and the {{LIKE % }}is unnecessary.

      On medium/large env with dozens/hundreds millions of artifacts, it can reach to seconds per query vs millis with an optimized query

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              barh Bar Haim
              Reporter:
              shayb Shay Bagants
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-19936 -
                  SYNCHRONIZED
                  • Last Sync Date: