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

Sharding - Deploying the same file (same checksum) multiple times may delete the binary

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.14.2, 4.16.0
    • Fix Version/s: 5.1.0
    • Component/s: Filestore
    • Labels:
      None
    • Sprint:
      Leap 5

      Description

      Deploying the same file (same checksum) multiple times may delete the binary.

      This will cause subsequent requests for the file to fail with the errors

      artifactory.log:

      2017-01-27 21:14:44,827 [http-nio-8081-exec-539] [WARN ] (o.a.r.ArtifactoryResponseBase:107) - Sending HTTP error code 500: Could not process download request: Binary provider has no content for '4f26f280e8e20ae135ebed20748c251f842bbe87'
      

      To reproduce

      1. Setup file sharding with the sample binarystore.xml provided
      2. Run the provided script to simulate multiple upload/requests
      3. Notice the intermittent failures that result in http 500

      Sample binarystore.xml

      <config version="4">
          <chain>
              <provider id="sharding" type="sharding">
                  <sub-provider id="shard1" type="state-aware"/>
                  <sub-provider id="shard2" type="state-aware"/>
              </provider>
          </chain>
          <provider id="sharding" type="sharding">
              <readBehavior>roundRobin</readBehavior>
              <writeBehavior>roundRobin</writeBehavior>
              <redundancy>1</redundancy>
          </provider>
          <provider id="shard1" type="state-aware">
              <fileStoreDir>/filestore1</fileStoreDir>
          </provider>
          <provider id="shard2" type="state-aware">
              <fileStoreDir>/filestore2</fileStoreDir>
          </provider>
      </config>
      

      script.sh

      #!/bin/bash
      ART_CREDS=admin:password
      ART_REPO=http://localhost:8081/artifactory/libs-release-local
      FILE_TO_DEPLOY=script.sh
      for VARIABLE in {1..1500}
      do
       curl -XPUT -u $ART_CREDS --upload-file $FILE_TO_DEPLOY $ART_REPO/access$VARIABLE.log > /dev/null 2> /dev/null &
       curl -s -o /dev/null -w "%{http_code}\n" $ART_REPO/access1.log | grep 500 &
      done
      

        Attachments

          Activity

            People

            • Assignee:
              nadavy Nadav Yogev
              Reporter:
              arturoa Arturo Aparicio
              Assigned QA:
              Matan Katz
            • Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: