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

Staging move operations for Maven rebuilds maven metadata for unrelated components resulting in extremely slow operations

    Details

    • Story Points:
      5
    • Sprint:
      NXRM MadMax Sprint 32, NXRM MadMax Sprint 33
    • Notability:
      3

      Description

      ISSUE:

      It looks like moving one GAV with the staging API triggers checking all maven metadata in the same group.
      Each check is fast (20 ~ 30 ms) but when there are a few thousands GAVs in the group, the staging API can take a few minutes or more to complete.

      REPRODUCE STEPS

      1. Create two hosted repositories: maven-hosted and maven-releases
      2. Generate dummy data (please check 55985_prepare.sh )
      3. Enable DEBUG logging for "org.sonatype.nexus.repository.maven.internal"
      4. Move only one version 1.8:
        curl -D- -u admin:admin123 -X POST 'http://localhost:8081/service/rest/v1/staging/move/maven-releases?repository=maven-hosted&maven.groupId=test.example55985&maven.artifactId=my-app1&maven.baseVersion=1.8'

      EXPECTED BEHAVIOUR:

      In the nexus.log, not many DEBUG logging line: org.sonatype.nexus.repository.maven.internal.hosted.metadata.MetadataBuilder - -> GAbV: ...
      Or, if this check is necessary, it should be checked parallely.

      ACTUAL BEHAVIOUR:

      It checked 26 GAVs:

      $ grep -E 'qtp887917427-129.+MetadataBuilder - -> GAbV' ./sonatype-work/nexus3/log/nexus.log -c
      26
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aortiz Andres Ortiz
              Reporter:
              hosako Hajime Osako
              Last Updated By:
              Joe Tom Joe Tom
              Team:
              NXRM - Mad Max
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title