Some Background
This issue is for deadlocks in a specific code path - BuildNumber generation.
Problems:
1. We unnecessary create 2 transactions one when DefaultPlanManager.generateBuildNumber is called and then another one within the first transaction when PlanHibernateDao.generateBuildNumberNewTx. In situation when many threads enter the first transaction and wait for the connection for the second(inner) transaction we get a deadlock.
2. To ensure the uniqueness of build number we need to use synchronization inside java code. However right now we synchronize from within transaction which is wrong. It can lead to the situation when one thread changed value and exited the synchronized block however has not yet committed the value. Another thread that entered the synchronized block will see a stale value.
[BAM-5789] Deadlock during BuildNumber generation
Workflow | Original: Bamboo Workflow 2016 v1 - Restricted [ 1442604 ] | New: JAC Bug Workflow v3 [ 3383479 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Workflow | Original: Bamboo Workflow 2016 v1 [ 1419883 ] | New: Bamboo Workflow 2016 v1 - Restricted [ 1442604 ] |
Workflow | Original: Bamboo Workflow 2014 v2 [ 616878 ] | New: Bamboo Workflow 2016 v1 [ 1419883 ] |
Workflow | Original: Bamboo Workflow 2014 [ 602658 ] | New: Bamboo Workflow 2014 v2 [ 616878 ] |
Workflow | Original: Bamboo Workflow 2010 [ 210514 ] | New: Bamboo Workflow 2014 [ 602658 ] |
Fix Version/s | New: 2.6 [ 15056 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: To be reviewed [ 10026 ] | New: Resolved [ 5 ] |
Status | Original: In Progress [ 3 ] | New: To be reviewed [ 10026 ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |