-
Bug
-
Resolution: Fixed
-
Low
-
6.7.2, 6.9.0
-
3
-
Severity 3 - Minor
-
Issue Summary
Duplicate project keys when double clicking "save" on creating a new project
Steps to Reproduce
- Select Create and Project
- Double click on Save
Expected Results
Only one project is created.
Actual Results
Two projects are created with the same key in PROJECTS table:
project_id | created_date | updated_date | project_key | title | description | marked_for_deletion | oid |
---|---|---|---|---|---|---|---|
218759169 | 2019-09-04 11:58:32 | 2019-09-04 11:58:32 | PKEY | TITLE | false | 3225703233104165889 | |
218759170 | 2019-09-04 11:58:32 | 2019-09-04 11:58:32 | PKEY | TITLE | false | 3225703233104165890 |
The below exception is thrown in the atlassian-bamboo.log and UI when viewing the project:
org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2; nested exception is org.hibernate.NonUniqueResultException: query did not return a unique result: 2 at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:262) at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:386) at org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:335) at com.atlassian.bamboo.project.ProjectHibernateDao.getProjectByKey(ProjectHibernateDao.java:123) at sun.reflect.GeneratedMethodAccessor983.invoke(Unknown Source) 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:343) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) at com.sun.proxy.$Proxy147.getProjectByKey(Unknown Source) at com.atlassian.bamboo.project.DefaultProjectManager.getProjectByKey(DefaultProjectManager.java:96)
Workaround
Single click in Save
- is cloned from
-
BAM-20610 Possible to create duplicate project keys with concurrent Bamboo Specs pushes
- Closed
-
BDEV-15679 Loading...