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

eager caching of nuget versions contributes to slow query performance

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.0.1, 3.0.2
    • Fix Version/s: 3.1.0
    • Component/s: NuGet
    • Story Points:
      3
    • Sprint:
      Sprint 79, Sprint 80

      Description

      External Report: Paket: 1912(https://github.com/fsprojects/Paket/issues/1912)

      I build our solutions with FAKE. In Interaction with Nexus 3 the `paket update` took very long, if I have FAKE in it (I think the problem here is on Nexus 3 side, because it tries to download all the versions of FAKE - and there are a lot of them). And it fails.

      C:\Temp\NexusTest>.paket\paket.exe update 
      Paket version 3.19.1.0 
      Resolving packages for group Main: 
      Paket failed with: 
      Could not find versions for package FAKE on http://localhost:8081/repository/nuget-group. 
      

      I prepared a simple project to reproduce the steps:

      https://github.com/WebDucer/Nexus3PaketIssue

      1. Install the Docker container for Nexus 3

      docker run -d -p 8081:8081 --name nuget-repo sonatype/docker-nexus3 
      

      2. Use the project above to execute `paket update` against nuget.org or Nexus3 as source (comment the unneded sources out).

      Expected behavior

      `paket update` should update quicker for packages with a lot of versions

      Actual behavior

      `paket update` need a lot of time, if package `FAKE` is in it.

      Known workarounds

      Using of two sources (nuget.org on the first place and Nexus 3 on the second).

      Thread dump shows the thread getting all versions doing this:

      qtp2081197315-75 id=75 state=RUNNABLE
          at java.util.HashMap.hash(HashMap.java:338)
          at java.util.HashMap.containsKey(HashMap.java:595)
          at com.orientechnologies.orient.core.db.record.OTrackedMap.put(OTrackedMap.java:72)
          at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.readEmbeddedMap(ORecordSerializerBinaryV0.java:439)
          at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.readSingleValue(ORecordSerializerBinaryV0.java:365)
          at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.readEmbeddedMap(ORecordSerializerBinaryV0.java:435)
          at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.readSingleValue(ORecordSerializerBinaryV0.java:365)
          at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.deserializePartial(ORecordSerializerBinaryV0.java:143)
          at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinary.fromStream(ORecordSerializerBinary.java:72)
          at com.orientechnologies.orient.core.record.impl.ODocument.deserializeFields(ODocument.java:1817)
          at com.orientechnologies.orient.core.sql.filter.OSQLFilterItemField.getValue(OSQLFilterItemField.java:105)
          at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:315)
          at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:76)
          at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:320)
          at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:76)
          at com.orientechnologies.orient.core.sql.filter.OSQLFilter.evaluate(OSQLFilter.java:100)
          at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.evaluateRecord(OCommandExecutorSQLResultsetAbstract.java:401)
          at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.filter(OCommandExecutorSQLResultsetAbstract.java:391)
          at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearchRecord(OCommandExecutorSQLSelect.java:570)
          at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.fetchFromTarget(OCommandExecutorSQLSelect.java:1481)
          at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:502)
          at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:460)
          at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:90)
          at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:1547)
          at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:1528)
          at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:67)
          at org.sonatype.nexus.repository.storage.MetadataNodeEntityAdapter.browseByQuery(MetadataNodeEntityAdapter.java:160)
          at org.sonatype.nexus.repository.storage.StorageTxImpl.findAssets(StorageTxImpl.java:311)
          at org.sonatype.nexus.repository.storage.StorageTxImpl.findAssets(StorageTxImpl.java:317)
          at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
      

        Attachments

        1. karaf.log
          0.4 kB
          Peter Lynch
        2. nexus.log
          54 kB
          Peter Lynch
        3. PaketLog.txt
          196 kB
          Peter Lynch
        4. request.log
          13 kB
          Peter Lynch
        5. ThreadLog.txt
          69 kB
          Peter Lynch

          Issue Links

            Activity

              People

              Assignee:
              ecobb Eric Cobb
              Reporter:
              er@recy-systems.com Eugen Richter
              Last Updated By:
              Peter Lynch Peter Lynch
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title