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

NPM metadata recursively calculates same versions more than once

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.5.1, 5.10.3
    • Fix Version/s: 6.1.0
    • Component/s: Metadata, NPM
    • Labels:
      None

      Description

      To reproduce:

      • Create an npm-local repository
      • Publish 4 versions of the same package, for example:
      • Trigger the metadata calculation by either UI (right-click on the repo and "Recalculate Index") or REST API (POST /api/npm/npm-local/reindex).
        Note that it is also reproducable upon deployment of a new version
      • The calculation will go version by version, but for each one, it will go again over all the versions, as follows: 1.0.0,1.0.0,2.0.0,3.0.0,4.0.0...2,1,2,3,4...3,1,2,3,4...4,1,2,3,4

      This might be severe when you have a package with +300 versions, because the metadata calculation will run 300*300=90,000 times.

      2017-11-13 15:00:15,944 [art-exec-30063] [DEBUG] (o.a.a.n.NpmServiceImpl:130) - Checking for repository npm metadata calculation requests.
      2017-11-13 15:00:15,944 [art-exec-30063] [DEBUG] (o.a.a.n.NpmServiceImpl:135) - Checking if npm metadata recalculation can be scheduled for repository 'npm-local'.
      2017-11-13 15:00:15,945 [art-exec-30063] [DEBUG] (o.a.a.n.NpmServiceImpl:146) - Npm metadata recalculation was not performed for repository 'npm-local': quiet period is not over yet.
      2017-11-13 15:00:15,945 [art-exec-30063] [DEBUG] (o.a.a.n.NpmServiceImpl:135) - Checking if npm metadata recalculation can be scheduled for repository 'npm'.
      2017-11-13 15:00:15,945 [art-exec-30063] [DEBUG] (o.a.a.n.NpmServiceImpl:146) - Npm metadata recalculation was not performed for repository 'npm': quiet period is not over yet.
      2017-11-13 15:01:15,944 [art-exec-30063] [DEBUG] (o.a.a.n.NpmServiceImpl:135) - Checking if npm metadata recalculation can be scheduled for repository 'npm-local'.
      2017-11-13 15:01:15,944 [art-exec-30063] [INFO ] (o.a.a.n.NpmServiceImpl:194) - Npm metadata recalculation has been started for repository 'npm-local'
      2017-11-13 15:01:15,945 [art-exec-30063] [INFO ] (o.a.a.n.NpmServiceImpl:202) - Recursively reindexing npm packages under 'npm-local:'.
      2017-11-13 15:01:15,972 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-1.0.0.tgz'
      2017-11-13 15:01:16,015 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-1.0.0.tgz'
      2017-11-13 15:01:16,038 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-2.0.0.tgz'
      2017-11-13 15:01:16,057 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-3.0.0.tgz'
      2017-11-13 15:01:16,076 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-4.0.0.tgz'
      2017-11-13 15:01:16,078 [art-exec-30063] [INFO ] (o.j.r.n.NpmPackageMetadataIndexer:144) - Preparing to write npm package metadata for repo 'npm-local' on path '.npm/testpackage/package.json'
      2017-11-13 15:01:16,124 [art-exec-30063] [INFO ] (o.j.r.n.NpmPackageMetadataIndexer:151) - Finished writing npm package metadata for repo 'npm-local' on path '.npm/testpackage/package.json'
      2017-11-13 15:01:16,145 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-2.0.0.tgz'
      2017-11-13 15:01:16,176 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-1.0.0.tgz'
      2017-11-13 15:01:16,187 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-2.0.0.tgz'
      2017-11-13 15:01:16,204 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-3.0.0.tgz'
      2017-11-13 15:01:16,219 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-4.0.0.tgz'
      2017-11-13 15:01:16,220 [art-exec-30063] [INFO ] (o.j.r.n.NpmPackageMetadataIndexer:144) - Preparing to write npm package metadata for repo 'npm-local' on path '.npm/testpackage/package.json'
      2017-11-13 15:01:16,282 [art-exec-30063] [INFO ] (o.j.r.n.NpmPackageMetadataIndexer:151) - Finished writing npm package metadata for repo 'npm-local' on path '.npm/testpackage/package.json'
      2017-11-13 15:01:16,312 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-3.0.0.tgz'
      2017-11-13 15:01:16,338 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-1.0.0.tgz'
      2017-11-13 15:01:16,355 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-2.0.0.tgz'
      2017-11-13 15:01:16,369 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-3.0.0.tgz'
      2017-11-13 15:01:16,382 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-4.0.0.tgz'
      2017-11-13 15:01:16,382 [art-exec-30063] [INFO ] (o.j.r.n.NpmPackageMetadataIndexer:144) - Preparing to write npm package metadata for repo 'npm-local' on path '.npm/testpackage/package.json'
      2017-11-13 15:01:16,430 [art-exec-30063] [INFO ] (o.j.r.n.NpmPackageMetadataIndexer:151) - Finished writing npm package metadata for repo 'npm-local' on path '.npm/testpackage/package.json'
      2017-11-13 15:01:16,456 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-4.0.0.tgz'
      2017-11-13 15:01:16,481 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-1.0.0.tgz'
      2017-11-13 15:01:16,501 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-2.0.0.tgz'
      2017-11-13 15:01:16,514 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-3.0.0.tgz'
      2017-11-13 15:01:16,530 [art-exec-30063] [DEBUG] (o.j.r.n.NpmMetadataExtractor:50) - Returning the cached npm version metadata for artifact 'testpackage/-/testpackage-4.0.0.tgz'
      2017-11-13 15:01:16,530 [art-exec-30063] [INFO ] (o.j.r.n.NpmPackageMetadataIndexer:144) - Preparing to write npm package metadata for repo 'npm-local' on path '.npm/testpackage/package.json'
      2017-11-13 15:01:16,578 [art-exec-30063] [INFO ] (o.j.r.n.NpmPackageMetadataIndexer:151) - Finished writing npm package metadata for repo 'npm-local' on path '.npm/testpackage/package.json'
      2017-11-13 15:01:16,581 [art-exec-30063] [INFO ] (o.j.r.n.NpmRepoMetadataIndexer:64) - Preparing to write npm repo metadata for repository 'npm-local'
      2017-11-13 15:01:16,625 [art-exec-30063] [INFO ] (o.j.r.n.NpmRepoMetadataIndexer:67) - Finished writing npm repo metadata for repository 'npm-local'
      2017-11-13 15:01:16,625 [art-exec-30063] [INFO ] (o.a.a.n.NpmServiceImpl:214) - Finished npm metadata recalculation for repo 'npm-local' in 681 millis
      2017-11-13 15:01:16,626 [art-exec-30063] [DEBUG] (o.a.a.n.NpmServiceImpl:135) - Checking if npm metadata recalculation can be scheduled for repository 'npm'.
      2017-11-13 15:01:16,627 [art-exec-30063] [INFO ] (o.a.a.n.NpmServiceImpl:239) - Npm metadata recalculation has been started for repository 'npm'
      2017-11-13 15:01:16,656 [art-exec-30063] [INFO ] (o.a.a.n.NpmServiceImpl:269) - Finished npm metadata recalculation for repo 'npm' in 29.08 millis
      

        Attachments

          Activity

            People

            • Assignee:
              rotemk Rotem Kfir
              Reporter:
              avivb Aviv Blonder
              Assigned QA:
              Konstantin Shenderov
            • Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: