Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-23731

Blob Store API returns 500 server error if create blob with the same name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: New
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Blobstore, REST
    • Labels:

      Description

      Steps to reproduce:
      Run command to create blob store two times without changes

      bin curl -v -u admin:admin123 -X POST "http://localhost:8081/service/rest/beta/blobstores/file" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"path\": \"some-name\", \"name\": \"some-blob\"}"
      

      Expected results:  e.g. 400 with proper message to indicate that such blob already exists. 

      Actual results: 

      HTTP/1.1 500 Server Error< Date: Tue, 28 Apr 2020 12:25:59 GMT< Server: Nexus/3.23.0-SNAPSHOT (PRO)< X-Content-Type-Options: nosniff< Content-Type: text/plain;charset=utf-8< X-Siesta-FaultId: 5fade477-52c4-4bb3-bf9c-f75dec62f5da< Content-Length: 322<ERROR: (ID 5fade477-52c4-4bb3-bf9c-f75dec62f5da) com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record #43:1: found duplicated key 'empty-p' in index 'repository_blobstore_name_idx' previously assigned to the record #50:0* Connection #0 to host localhost left intact DB name="config" INDEX=repository_blobstore_name_idx RID=#50:0%
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            aornatovskyy Anatoliy Ornatovskyy
            Last Updated By:
            Joe Tom Joe Tom
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                tigCommentSecurity.panel-title