Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-26064

Activity Stream times out on Build Activity due to slow query

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • 11.0.0
    • 8.0.12, 10.2.1, 9.6.12
    • Dashboard
    • None

      Issue Summary

      Activity Stream times out on Build Activity dashboard due to slow query execution. Only happening on large datasets. For example, ~3mil records in BUILDRESULTSUMMARY table.

      Steps to Reproduce

      1. Go to Build - > Build Activity  ( This will occur at scale not on small instance. Customer discosed 

      Expected Results

      List build activity.

      Actual Results

      The below exception is thrown in the atlassian-bamboo.log file:

      37_2025-03-19T23:14:12.292Z/application-logs$ grep -R "StreamsCompletionService" atlassian-bamboo.log -B1
      2025-03-17 10:35:53,850 WARN [http-nio-8085-exec-25] [Execution] Registering failure for stream provider Bamboo due to cancellation (timeout)
      2025-03-17 10:35:53,851 WARN [http-nio-8085-exec-25] [StreamsCompletionService] Registering failure for stream provider Bamboo due to error timeout
      -- 

      Thread dump for StreamsCompletionService

      "StreamsCompletionService::thread-15" #50649 prio=5 os_prio=0 cpu=0.99ms elapsed=12.32s tid=0x00007f19d2413210 nid=0x16dd runnable  [0x00007f19226f2000]
         java.lang.Thread.State: RUNNABLE
      	at sun.nio.ch.Net.poll(java.base@17.0.11/Native Method)
      	at sun.nio.ch.NioSocketImpl.park(java.base@17.0.11/NioSocketImpl.java:186)
      	at sun.nio.ch.NioSocketImpl.park(java.base@17.0.11/NioSocketImpl.java:195)
      	at sun.nio.ch.NioSocketImpl.implRead(java.base@17.0.11/NioSocketImpl.java:319)
      	at sun.nio.ch.NioSocketImpl.read(java.base@17.0.11/NioSocketImpl.java:355)
      	at sun.nio.ch.NioSocketImpl$1.read(java.base@17.0.11/NioSocketImpl.java:808)
      	at java.net.Socket$SocketInputStream.read(java.base@17.0.11/Socket.java:966)
      	at sun.security.ssl.SSLSocketInputRecord.read(java.base@17.0.11/SSLSocketInputRecord.java:484)
      	at sun.security.ssl.SSLSocketInputRecord.readHeader(java.base@17.0.11/SSLSocketInputRecord.java:478)
      	at sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(java.base@17.0.11/SSLSocketInputRecord.java:70)
      	at sun.security.ssl.SSLSocketImpl.readApplicationRecord(java.base@17.0.11/SSLSocketImpl.java:1465)
      	at sun.security.ssl.SSLSocketImpl$AppInputStream.read(java.base@17.0.11/SSLSocketImpl.java:1069)
      	at java.io.FilterInputStream.read(java.base@17.0.11/FilterInputStream.java:132)
      	at com.mysql.cj.protocol.FullReadInputStream.readFully(FullReadInputStream.java:55)
      	at com.mysql.cj.protocol.a.SimplePacketReader.readHeaderLocal(SimplePacketReader.java:72)
      	at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:54)
      	at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:36)
      	at com.mysql.cj.protocol.a.TimeTrackingPacketReader.readHeader(TimeTrackingPacketReader.java:43)
      	at com.mysql.cj.protocol.a.TimeTrackingPacketReader.readHeader(TimeTrackingPacketReader.java:32)
      	at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:45)
      	at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:35)
      	at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:591)
      	at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:775)
      	at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:714)
      	at com.mysql.cj.protocol.a.NativeProtocol.sendQueryPacket(NativeProtocol.java:946)
      	at com.mysql.cj.NativeSession.execSQL(NativeSession.java:803)
      	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:915)
      	- locked <0x000000050ddc1798> (a com.mysql.cj.jdbc.ConnectionImpl)
      	at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1004)
      	- locked <0x000000050ddc1798> (a com.mysql.cj.jdbc.ConnectionImpl)
      	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
      	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
      	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:57)
      	at org.hibernate.loader.Loader.getResultSet(Loader.java:2322)
      	at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2075)
      	at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2037)
      	at org.hibernate.loader.Loader.doQuery(Loader.java:956)
      	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:357)
      	at org.hibernate.loader.Loader.doList(Loader.java:2868)
      	at org.hibernate.loader.Loader.doList(Loader.java:2850)
      	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2682)
      	at org.hibernate.loader.Loader.list(Loader.java:2677)
      	at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:109)
      	at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1922)
      	at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:370)
      	at com.atlassian.bamboo.resultsummary.BuildResultsSummaryHibernateDao.lambda$findResultsSummaries$5(BuildResultsSummaryHibernateDao.java:656)
      	at com.atlassian.bamboo.resultsummary.BuildResultsSummaryHibernateDao$$Lambda$4403/0x00007f1a465311f0.doInHibernate(Unknown Source)
      	at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:367)
      	at org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:320)
      	at com.atlassian.bamboo.resultsummary.BuildResultsSummaryHibernateDao.findResultsSummaries(BuildResultsSummaryHibernateDao.java:656)
      	at com.atlassian.bamboo.resultsummary.BuildResultsSummaryManagerImpl.getResultSummaries(BuildResultsSummaryManagerImpl.java:710)
      	at jdk.internal.reflect.GeneratedMethodAccessor1862.invoke(Unknown Source)
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17.0.11/DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(java.base@17.0.11/Method.java:568)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
      	at com.atlassian.bamboo.security.acegi.intercept.aopalliance.AuthorityOverrideMethodSecurityInterceptor.invoke(AuthorityOverrideMethodSecurityInterceptor.java:22)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
      	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241)
      	at jdk.proxy3.$Proxy283.getResultSummaries(jdk.proxy3/Unknown Source)
      	at jdk.internal.reflect.GeneratedMethodAccessor1862.invoke(Unknown Source)
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17.0.11/DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(java.base@17.0.11/Method.java:568)
      	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
      	at jdk.proxy3.$Proxy282.getResultSummaries(jdk.proxy3/Unknown Source)
      	at jdk.internal.reflect.GeneratedMethodAccessor1862.invoke(Unknown Source)
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17.0.11/DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(java.base@17.0.11/Method.java:568)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241)
      	at jdk.proxy72.$Proxy1519.getResultSummaries(jdk.proxy72/Unknown Source)
      	at com.atlassian.streams.bamboo.BambooStreamsActivityProvider.getResultsSummaryFromPlans(BambooStreamsActivityProvider.java:229)
      	at com.atlassian.streams.bamboo.BambooStreamsActivityProvider.getResultSummaries(BambooStreamsActivityProvider.java:165)
      	at com.atlassian.streams.bamboo.BambooStreamsActivityProvider$1.call(BambooStreamsActivityProvider.java:131)
      	at com.atlassian.streams.bamboo.BambooStreamsActivityProvider$1.call(BambooStreamsActivityProvider.java:124)
      	at com.atlassian.streams.internal.feed.builder.FeedFetcher.doInTransaction(FeedFetcher.java:51)
      	at com.atlassian.streams.internal.feed.builder.FeedFetcher.doInTransaction(FeedFetcher.java:30)
      	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21)
      	at com.atlassian.sal.spring.component.SpringHostContextAccessor.lambda$doInTransaction$0(SpringHostContextAccessor.java:72)
      	at com.atlassian.sal.spring.component.SpringHostContextAccessor$$Lambda$1874/0x00007f1a45ab08b0.doInTransaction(Unknown Source)
      	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
      	at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:70)
      	at jdk.internal.reflect.GeneratedMethodAccessor215.invoke(Unknown Source)
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17.0.11/DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(java.base@17.0.11/Method.java:568)
      	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
      	at jdk.proxy3.$Proxy506.doInTransaction(jdk.proxy3/Unknown Source)
      	at jdk.internal.reflect.GeneratedMethodAccessor215.invoke(Unknown Source)
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17.0.11/DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(java.base@17.0.11/Method.java:568)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241)
      	at jdk.proxy28.$Proxy942.doInTransaction(jdk.proxy28/Unknown Source)
      	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)
      	at jdk.internal.reflect.GeneratedMethodAccessor223.invoke(Unknown Source)
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17.0.11/DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(java.base@17.0.11/Method.java:568)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241)
      	at jdk.proxy76.$Proxy1568.execute(jdk.proxy76/Unknown Source)
      	at com.atlassian.streams.internal.LocalActivityProvider$1.lambda$call$0(LocalActivityProvider.java:120)
      	at com.atlassian.streams.internal.LocalActivityProvider$1$$Lambda$4396/0x00007f1a46539228.get(Unknown Source)
      	at com.atlassian.streams.common.PassThruSessionManager.withSession(PassThruSessionManager.java:14)
      	at com.atlassian.streams.common.SwitchingSessionManager.withSession(SwitchingSessionManager.java:30)
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@17.0.11/Native Method)
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@17.0.11/NativeMethodAccessorImpl.java:77)
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17.0.11/DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(java.base@17.0.11/Method.java:568)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241)
      	at jdk.proxy76.$Proxy1556.withSession(jdk.proxy76/Unknown Source)
      	at com.atlassian.streams.internal.LocalActivityProvider$1.call(LocalActivityProvider.java:120)
      	at com.atlassian.streams.internal.LocalActivityProvider$1.call(LocalActivityProvider.java:104)
      	at com.atlassian.streams.internal.ActivityProviderWithAnalytics$1.call(ActivityProviderWithAnalytics.java:39)
      	at com.atlassian.streams.internal.ActivityProviderWithAnalytics$1.call(ActivityProviderWithAnalytics.java:33)
      	at com.atlassian.streams.internal.feed.builder.ToFeedCallable$1.call(ToFeedCallable.java:63)
      	at com.atlassian.streams.internal.feed.builder.ToFeedCallable$1.call(ToFeedCallable.java:60)
      	at java.util.concurrent.FutureTask.run(java.base@17.0.11/FutureTask.java:264)
      	at java.util.concurrent.Executors$RunnableAdapter.call(java.base@17.0.11/Executors.java:539)
      	at java.util.concurrent.FutureTask.run(java.base@17.0.11/FutureTask.java:264)
      	at com.atlassian.sal.core.executor.ThreadLocalDelegateRunnable.run(ThreadLocalDelegateRunnable.java:34)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@17.0.11/ThreadPoolExecutor.java:1136)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@17.0.11/ThreadPoolExecutor.java:635)
      	at java.lang.Thread.run(java.base@17.0.11/Thread.java:840)
      

      Hibernate SQL DEBUG

      2025-03-26 09:52:27,153 DEBUG [StreamsCompletionService::thread-4] [SQL] select this_.BUILDRESULTSUMMARY_ID as buildres1_24_0_, this_.BUILD_TYPE as build_ty2_24_0_, this_.CREATED_DATE as created_3_24_0_, this_.BUILD_KEY as build_ke4_24_0_, this_.PLAN_NAME as plan_nam5_24_0_, this_.BUILD_NUMBER as build_nu6_24_0_, this_.BUILD_STATE as build_st7_24_0_, this_.LIFE_CYCLE_STATE as life_cyc8_24_0_, this_.BUILD_DATE as build_da9_24_0_, this_.BUILD_CANCELLED_DATE as build_c10_24_0_, this_.BUILD_COMPLETED_DATE as build_c11_24_0_, this_.DURATION as duratio12_24_0_, this_.PROCESSING_DURATION as process13_24_0_, this_.TIME_TO_FIX as time_to14_24_0_, this_.TRIGGER_REASON as trigger15_24_0_, this_.DELTA_STATE as delta_s16_24_0_, this_.BUILD_AGENT_ID as build_a17_24_0_, this_.BUILD_AGENT_TYPE as build_a18_24_0_, this_.STAGERESULT_ID as stagere19_24_0_, this_.RESTART_COUNT as restart20_24_0_, this_.QUEUE_TIME as queue_t21_24_0_, this_.MARKED_FOR_DELETION as marked_22_24_0_, this_.ONCE_OFF as once_of23_24_0_, this_.CUSTOM_BUILD as custom_24_24_0_, this_.REBUILD as rebuild25_24_0_, this_.LOG_SIZE as log_siz26_24_0_, this_.VARIABLE_CONTEXT_BASELINE_ID as variabl27_24_0_, this_.FORMAT_VERSION as format_28_24_0_, this_.SPECS_RESULT as specs_r29_24_0_, this_.FAILURE_TEST_COUNT as failure30_24_0_, this_.SUCCESS_TEST_COUNT as success31_24_0_, this_.TOTAL_TEST_COUNT as total_t32_24_0_, this_.BROKEN_TEST_COUNT as broken_33_24_0_, this_.EXISTING_TEST_COUNT as existin34_24_0_, this_.FIXED_TEST_COUNT as fixed_t35_24_0_, this_.TOTAL_TEST_DURATION as total_t36_24_0_, this_.QUARANTINED_TEST_COUNT as quarant37_24_0_, this_.SKIPPED_TEST_COUNT as skipped38_24_0_, this_.VCS_UPDATE_TIME as vcs_upd39_24_0_, this_.CHAIN_RESULT as chain_r40_24_0_ from BUILDRESULTSUMMARY this_ where this_.BUILD_TYPE='BUILD' and this_.BUILD_TYPE in (?) and this_.LIFE_CYCLE_STATE=? and this_.MARKED_FOR_DELETION=? order by this_.BUILD_COMPLETED_DATE desc limit ?

      Workaround

      Add an index for the column BUILD_COMPLETED_DATE on BUILDRESULTSUMMARY:

      CREATE INDEX brs_build_completed_date_idx ON BUILDRESULTSUMMARY (BUILD_COMPLETED_DATE);

            [BAM-26064] Activity Stream times out on Build Activity due to slow query

            There are no comments yet on this issue.

              851f15845f55 Mateusz Szmal
              146a7ea35c2c Alex
              Affected customers:
              0 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated: