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

Threads not cooperating when handling missing blobs for npm group package roots

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.29.2
    • Fix Version/s: 3.30.1
    • Component/s: NPM

      Description

      Problem Summary

      In npm group repositories NXRM needs to cache merged package level metadata. E.g, a request to "http://localhost:8081/repository/npm-group/lodash" will generate a merged JSON file for the "lodash" metadata, and store it in blob storage.

      If there is a reference to a blob file that does not exist on disk in an npm group repository NXRM will rebuild the merged group level metadata, and replace the bad reference with a good one. It will then deliver the corrected metadata to the requesting client.

      For the case where there are multiple simultaneous requests made for a group's package level metadata, and the blob file is missing all the inbound threads simultaneously try to rebuild and store the metadata at the same time. This creates a performance issue due to the spawning of these extra worker threads

      Expected

      Only one thread should do the rebuild, and the others should queue up and wait for it to complete, then proceed after one is complete.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bradbeck Brad Beck
              Reporter:
              bradbeck Brad Beck
              Last Updated By:
              Joe Tom Joe Tom
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title