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

Artifactory startup hangs for minutes In Oracle while checking if index exists

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.9.0, 6.10.0, 6.8.7
    • Component/s: None
    • Labels:
      None
    • Regression:
      Yes

      Description

      As a part of RTFACT-18148, the old code of index existence check per DB type was replaced with unified interface (java.sql.DatabaseMetaData#getIndexInfo). Each DB driver use it's own JDBC implementation and on large tables it takes minutes for Artifactory to start (tested with Oracle).

      An examples for such a thread: 

      "art-init" #26 daemon prio=5 os_prio=0 tid=0x00007f428c3bf800 nid=0x1316 runnable [0x00007f42694a9000]
      
         java.lang.Thread.State: RUNNABLE
      
              at java.net.SocketInputStream.socketRead0(Native Method)
      
              at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
      
              at java.net.SocketInputStream.read(SocketInputStream.java:171)
      
              at java.net.SocketInputStream.read(SocketInputStream.java:141)
      
              at oracle.net.ns.Packet.receive(Packet.java:311)
      
              at oracle.net.ns.DataPacket.receive(DataPacket.java:105)
      
              at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:305)
      
              at oracle.net.ns.NetInputStream.read(NetInputStream.java:249)
      
              at oracle.net.ns.NetInputStream.read(NetInputStream.java:171)
      
              at oracle.net.ns.NetInputStream.read(NetInputStream.java:89)
      
              at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:123)
      
              at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:79)
      
              at oracle.jdbc.driver.T4CMAREngineStream.unmarshalUB1(T4CMAREngineStream.java:429)
      
              at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:397)
      
              at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)
      
              at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587)
      
              at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:210)
      
              at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:30)
      
              at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:931)
      
              at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1150)
      
              at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1707)
      
              at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1670)
      
              - locked <0x00000006c509a638> (a oracle.jdbc.driver.T4CConnection)
      
              at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:310)
      
              at oracle.jdbc.OracleDatabaseMetaData.getIndexInfo(OracleDatabaseMetaData.java:4889)
      
              - locked <0x00000006c548a588> (a oracle.jdbc.driver.OracleDatabaseMetaData)
      
              at org.jfrog.storage.util.DbUtils.indexExists(DbUtils.java:316)
      
              at org.jfrog.storage.util.DbUtils.indexExists(DbUtils.java:307)
      
              at org.jfrog.storage.util.DbUtils.lambda$indexExists$2(DbUtils.java:291)
      
              at org.jfrog.storage.util.DbUtils$$Lambda$444/1919658785.apply(Unknown Source)
      
              at org.jfrog.storage.util.DbUtils.withConnection(DbUtils.java:459)
      
              at org.jfrog.storage.util.DbUtils.indexExists(DbUtils.java:291)
      
              at org.artifactory.storage.db.DbServiceImpl.verifyUniqueRepoPathChecksumState(DbServiceImpl.java:424)
      
              at org.artifactory.storage.db.DbServiceImpl.init(DbServiceImpl.java:193)
      
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      
              at java.lang.reflect.Method.invoke(Method.java:498)
      
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      
              at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
      
              at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
      
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      
              at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:76)
      
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      
              at com.sun.proxy.$Proxy152.init(Unknown Source)
      
              at org.artifactory.spring.ArtifactoryApplicationContext.refresh(ArtifactoryApplicationContext.java:259)
      
              at org.artifactory.spring.ArtifactoryApplicationContext.<init>(ArtifactoryApplicationContext.java:144)
      
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      
              at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      
              at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.configure(ArtifactoryContextConfigListener.java:211)
      
              at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.access$200(ArtifactoryContextConfigListener.java:67)
      
              at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener$1.run(ArtifactoryContextConfigListener.java:92)
      
      
      

       

        Attachments

          Activity

            People

            • Assignee:
              Dudim Dudi Morad (Inactive)
              Reporter:
              shayb Shay Bagants
              Assigned QA:
              Konstantin Shenderov (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: