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

replication performance impacts due to frequent database transactions

    Details

    • Story Points:
      3
    • Sprint:
      NXRM Neo Sprint 25, NXRM Neo Sprint 24
    • Notability:
      4
    • InvestmentLayer:
      support-escalated
    • Aha Concept:
      non-concept

      Description

      Slowness and unresponsive have been reported on Nexus 3 running with OrientDB and replication enabled. In both occurrences we have observed multiple threads attempting DB operations with a thread stack similar to the following:

      "qtp1379558530-4007" #4007 prio=5 os_prio=0 tid=0x00007f315c03d000 nid=0x3032 waiting on condition [0x00007f311925a000]
       java.lang.Thread.State: WAITING (parking)
       at sun.misc.Unsafe.park(Native Method)
       - parking to wait for <0x00000006476d3ec8> (a java.util.concurrent.Semaphore$NonfairSync)
       at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
       at java.util.concurrent.Semaphore.acquire(Semaphore.java:312)
       at com.orientechnologies.orient.core.db.OPartitionedDatabasePool.acquire(OPartitionedDatabasePool.java:197)
       at org.sonatype.nexus.orient.DatabasePoolWithOverflowImpl.acquire(DatabasePoolWithOverflowImpl.java:68)
       at org.sonatype.nexus.orient.DatabaseInstanceImpl.acquire(DatabaseInstanceImpl.java:55)
       at com.sonatype.nexus.replication.internal.db.orient.OrientReplicationConnectionStore.listWithoutTransaction(OrientReplicationConnectionStore.java:97)
       at com.sonatype.nexus.replication.internal.db.orient.OrientReplicationConnectionStore$$EnhancerByGuice$$1320739066.GUICE$TRAMPOLINE(<generated>)
       at com.sonatype.nexus.replication.internal.db.orient.OrientReplicationConnectionStore$$EnhancerByGuice$$1320739066$$Lambda$732/1108483829.apply(Unknown Source)
       at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:74)
       at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
       at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
       at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:54)
       at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)
       at com.google.inject.internal.InterceptorStackCallback.invoke(InterceptorStackCallback.java:55)
       at com.sonatype.nexus.replication.internal.db.orient.OrientReplicationConnectionStore$$EnhancerByGuice$$1320739066.listWithoutTransaction(<generated>)
       at com.sonatype.nexus.replication.internal.db.AssetEventListenerSupport.isRepoEnabled(AssetEventListenerSupport.java:83)
       at com.sonatype.nexus.replication.internal.db.AssetEventListenerSupport.validate(AssetEventListenerSupport.java:55)
       at com.sonatype.nexus.replication.internal.db.orient.OrientAssetEventListener.addToQueue(OrientAssetEventListener.java:70)
       at com.sonatype.nexus.replication.internal.db.orient.OrientAssetEventListener.on(OrientAssetEventListener.java:54)
       at sun.reflect.GeneratedMethodAccessor264.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:87)
       at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:72)
       at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
       at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:67)
       at com.google.common.eventbus.Dispatcher$ImmediateDispatcher.dispatch(Dispatcher.java:186)
       at com.google.common.eventbus.EventBus.post(EventBus.java:212)
       at org.sonatype.nexus.internal.event.EventManagerImpl.post(EventManagerImpl.java:127)
       at org.sonatype.nexus.orient.entity.EntityHook.postEvents(EntityHook.java:316)
       at org.sonatype.nexus.orient.entity.EntityHook.flushEvents(EntityHook.java:289)
       at org.sonatype.nexus.orient.entity.EntityHook.onAfterTxCommit(EntityHook.java:174)
       at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2949)
       at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2870)
       at org.sonatype.nexus.repository.storage.StorageTxImpl.commit(StorageTxImpl.java:196)
       at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at org.sonatype.nexus.common.stateguard.SimpleMethodInvocation.proceed(SimpleMethodInvocation.java:53)
       at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
       at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
       at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:57)
       at org.sonatype.nexus.common.stateguard.StateGuardAspect$1.invoke(StateGuardAspect.java:66)
       at com.sun.proxy.$Proxy238.commit(Unknown Source)
       at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:68)
       at org.sonatype.nexus.transaction.TransactionInterceptor.proceedWithTransaction(TransactionInterceptor.java:66)
       at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
       at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:75)
       at com.google.inject.internal.InterceptorStackCallback.invoke(InterceptorStackCallback.java:55)
       at org.sonatype.nexus.repository.maven.internal.orient.MavenFacetImpl$$EnhancerByGuice$$809538941.doPut(<generated>)
       at org.sonatype.nexus.repository.maven.internal.orient.MavenFacetImpl.put(MavenFacetImpl.java:320)
       at org.sonatype.nexus.repository.maven.internal.hosted.HostedHandler.doPut(HostedHandler.java:91)

      With replication disabled the performance issues with the above thread stacks did not occur

        Attachments

          Activity

            People

            Assignee:
            jhill Joshua Hill
            Reporter:
            hardeepn Hardeep Nagra
            Last Updated By:
            Michael Oliverio Michael Oliverio
            Team:
            NXRM - Neo
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title