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

RPM Primary.xml metadata calculation incorrect if cache-fs and rpmcache is empty


    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.4.4, 5.8.1
    • Fix Version/s: 5.9.0
    • Component/s: None
    • Labels:
    • Sprint:
      Leap 28


      For a cache-fs filestore, the primary.xml metadata for an artifact has incorrect rpm:header-range end value if you delete the artifact from the cache and the rpm cache. This is easily reproduced on a standalone instance, but needs to be tested for HA as well (for different combinations of cleared caches on different nodes)

      Steps to reproduce:
      -pulled the docker container docker.bintray.io/jfrog/artifactory-pro:latest
      -use default derby db, and the following binarystore.xml:
      <config version="v1">


      <provider type="cache-fs" id="cache-fs">

      <provider type="eventual" id="eventual">

      <provider type="retry" id="retry">

      <provider type="s3" id="s3"/>





      <provider type="cache-fs" id="cache-fs">




      <provider type="eventual" id="eventual"/>


      <provider type="retry" id="retry"/>

      <provider type="s3" id="s3">






      -Create a RPM repo that auto calculates metadata named rpm-local.
      Deploy an artifact (i used 389-ds-base- The repodata automatically calculates, and it calculates correctly.
      -Now manually clear out any local cache related to the RPM:
      rm /mnt/cache/filestore/81/81df3d0926eeae57f951c04b4a45cf924c57e421
      rm /var/opt/jfrog/artifactory/data/.rpmcache/rpm-local/389-ds-base-

      -And Force the repo to recalculate metadata through the UI (right click, recalculate index).
      When the artifact doesn’t exist in the cache-fs cache (/mnt/cache/filestore) AND .rpmcache, the header end calculated was 3634365, which is greater than the size of the package 1772792. See primary.xml.gz attached.
      -Afterwards, even if the file is cached after being downloaded again and the repo reindexed, metadata is still incorrect

      -Seems like the workaround must be to redeploy the artifact and reindex




            • Assignee:
              danf Dan Feldman
              mattheww Matthew Wang
              Assigned QA:
              Konstantin Shenderov
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: