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

New ruby gems dependency files are cached in blob storage every time Nexus requests them from a proxy repository remote

    XMLWordPrintable

    Details

    • Story Points:
      1

      Description

      After installing bundler using the "gem" command, I have these two files in my blobstore:

      $ find . -name \*.properties | xargs grep dep |grep bundle.ruby ./default/content/vol-14/chap-12/2275cf69-8d11-4358-9db3-aeef478ab151.properties:@BlobStore.blob-name=/dependencies/bundle.ruby ./default/content/vol-42/chap-03/22c81bc4-835b-4fdc-9fb4-2e3f3ee36707.properties:@BlobStore.blob-name=/dependencies/bundle.ruby

      After this, I expired cache in my rubygems.org proxy repository, and then requested this (just once):

      http://localhost:8081/repository/rubygems-proxy/api/v1/dependencies?gems=bundle

      And now I have:

      $ find . -name \*.properties | xargs grep dep |grep bundle.ruby ./default/content/vol-14/chap-12/2275cf69-8d11-4358-9db3-aeef478ab151.properties:@BlobStore.blob-name=/dependencies/bundle.ruby ./default/content/vol-23/chap-47/c3542d69-4f1c-476c-8ed4-2e4e2dd9f71a.properties:@BlobStore.blob-name=/dependencies/bundle.ruby ./default/content/vol-01/chap-41/8d4ed298-039b-4d9f-bca5-55d9ab09c1fe.properties:@BlobStore.blob-name=/dependencies/bundle.ruby ./default/content/vol-42/chap-03/22c81bc4-835b-4fdc-9fb4-2e3f3ee36707.properties:@BlobStore.blob-name=/dependencies/bundle.ruby

      Those older blobs are not marked for deletion, running compact blobstore does not remove them.

      Every time cache expires and the dependency request is made two more dependency files are cached. Over time, these will consume quite a lot of space.

      Expected: 
      1. Older dependency files should be deleted as new ones are downloaded from the remote. 
      2. Ideally, if the content of the file has not changed, no new file will be stored.
      3. We will need to publish a groovy script that can find the "orphaned" dependency blobs created by this bug and delete them.

        Attachments

          Activity

            People

            Assignee:
            jstephens Joseph Stephens
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Peter Lynch
            Team:
            Nexus - Formats
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title