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

Docker pull by digest from virtual repository shouldn't search in all repos when isResolveDockerTagsByTimestamp enabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 6.21.0, 7.7.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Severity:
      High

      Description

      Current behavior:
      When the "isResolveDockerTagsByTimestamp" flag is enabled for a Docker virtual repository, upon a Docker pull by digest, we are immediately searching for the manifest in all local repositories.

      Expected behavior:
      The "isResolveDockerTagsByTimestamp" flag should trigger the search in all repositories only when a pull by tag is performed, not by digest.

      The Problem:
      The search of the manifest in each repository is done using an SQL query that is under-performing, and reducing these searches as much as possible will help to significantly reduce load and improve performance.

      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 = ? AND N.DEPTH >= ? AND( N.NODE_PATH LIKE ? OR N.NODE_PATH = ?) AND N.NODE_NAME = ? AND N.NODE_TYPE = ?)
      

      Steps to reproduce:
      1. Setup an Artifactory instance with 10 local docker repositories and aggregate them to a virtual docker repository.
      2. Push a docker image to the first local repository.
      3. Enable JDBC logs to print the queries:

      <logger name="org.jfrog.storage.JdbcHelper">
      <level value="DEBUG"/>
      </logger>
      

      4. Perform a pull by digest once with the "isResolveDockerTagsByTimestamp" disabled and once with it enabled.
      5. Check how many times the above query was executed. When the flag is disabled, it is much less.

        Attachments

          Activity

              People

              Assignee:
              Unassigned
              Reporter:
              arielk Ariel Kabov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Sync Status

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