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

ERROR OConcurrentModificationException Cannot UPDATE the record because the version is not the latest during upgrade of npm repositories

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.7.0
    • Component/s: Migration, NPM
    • Labels:
    • Story Points:
      5

      Description

      During upgrade from Nexus 2.x to Nexus 3.x, Nexus 3 logs may report the following type of ERROR:

      2017-08-16 10:27:10,374+0000 ERROR [plan-executor-8-thread-4] admin com.sonatype.nexus.migration.repository.ProcessChangesStep - Failed processing of CREATE npm-public:/chokidar/-/chokidar-1.5.0.tgz, will ignore and move on. Reached max retries: 8/8
      org.sonatype.nexus.repository.storage.RetryDeniedException: Reached max retries: 8/8
      ....
      Caused by: com.orientechnologies.orient.core.exception.OConcurrentModificationException: Cannot UPDATE the record #32:11222 because the version is not the latest. Probably you are updating an old record or it has been modified by another user (db=v16 your=v15)
      DB name="component"
      at com.orientechnologies.orient.core.conflict.OVersionRecordConflictStrategy.checkVersions(OVersionRecordConflictStrategy.java:56)
      
      

      This looks like a problem where multiple ProcessChangesStep threads in Nexus 3 could be attempting to update the same npm package metadata for different tarballs. The concern is that some npm package metadata tarballs may be lost on upgrade to Nexus 3 when encountering this type of ERROR.

      In the case of a proxy repository, does not appear to be serious. In the case of this happening with a hosted repository, this is considerably more serious.

      Workaround

      In Nexus 3, edit ./bin/nexus.vmoptions
      Add this new line at the end of that file and save:

      -Dcom.sonatype.nexus.migration.repository.ProcessChangesStep.threads=1
      

      This attempts to reduce the migration concurrency to avoid the problem of different threads trying to update the same record.

      Restart the Nexus 3 migration using a completely empty karaf.data directory

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mdodgson Mark Dodgson
              Reporter:
              plynch Peter Lynch
              Last Updated By:
              Peter Lynch
              Team:
              Nexus - Formats
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title