-
Type:
Bug
-
Resolution: Fixed
-
Priority:
High
-
Affects Version/s: 9.6.24
-
Component/s: Import / Export
-
None
-
1
-
Severity 3 - Minor
Issue Summary
This issue is seen on large customer instances where there are huge number of row inside buildresultsummary table which has linked artifacts.
Steps to Reproduce
- Export the Bamboo Instance as per https://confluence.atlassian.com/bamboo/exporting-data-for-backup-289277255.html ( just choose Export results )
- Import the zip as per https://confluence.atlassian.com/bamboo/importing-data-from-backup-289277260.html
Expected Results
The Import should complete successfully.
Actual Results
The Import takes a long time and in the logs we can see the Import is processing
artifactLinks very slowly.
In the below example we can see this process is running for more than a day.
2026-05-12 14:29:38,743 INFO [http-nio-127.0.0.1-8085-exec-20] [BambooStAXMappingHelperAbstractImpl] Importing artifactLinks.artifactLink: 1000, used memory 16940 MB 2026-05-13 03:59:13,835 INFO [http-nio-127.0.0.1-8085-exec-20] [BambooStAXMappingHelperAbstractImpl] Importing artifactLinks.artifactLink: 147000, used memory 19406 MB
If we look at the thread dump we'll see Hibernate spending a lot of time in flushing the session while the data is being read from buildresultsummary table
java.lang.Thread.State: RUNNABLE
at java.lang.reflect.Field.getBoolean(java.base@17.0.18/Field.java:459)
at org.hibernate.property.access.spi.GetterFieldImpl.get(GetterFieldImpl.java:53)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValues(AbstractEntityTuplizer.java:587)
at org.hibernate.tuple.entity.PojoEntityTuplizer.getPropertyValues(PojoEntityTuplizer.java:154)
at org.hibernate.persister.entity.AbstractEntityPersister.getPropertyValues(AbstractEntityPersister.java:5289)
at org.hibernate.event.internal.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:210)
at org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:166)
at org.hibernate.event.internal.AbstractFlushingEventListener$$Lambda$1059/0x00007ed89b3fad98.accept(Unknown Source)
at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
at org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:229)
at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:93)
at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:50)
at org.hibernate.internal.SessionImpl$$Lambda$1085/0x00007ed89b447800.accept(Unknown Source)
at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1372)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1452)
at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1649)
at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1617)
at org.hibernate.query.internal.AbstractProducedQuery.uniqueResult(AbstractProducedQuery.java:1659)
at com.atlassian.bamboo.resultsummary.BuildResultsSummaryHibernateDao$1.doInHibernate(BuildResultsSummaryHibernateDao.java:159)
at com.atlassian.bamboo.resultsummary.BuildResultsSummaryHibernateDao$1.doInHibernate(BuildResultsSummaryHibernateDao.java:152)
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available
Important notes on resolution
In order to resolve this problem it was necessary to change the format of the affected files in backward-incompatible way. In particular:
- exports done with versions without this fix can be imported by the current versions, but with reduced performance (i.e performance fix is not applicable to the old format)
- exports done with versions with this fix can only be imported by versions that also contain the fix (as current versions expect data that is not exported by older versions)