Concurrent invocation of updateFieldConfigScheme on FieldConfigSchemeManager may cause a race condition which may result in IssueTypeScheme and PriorityScheme to revert to the default schemes.
- create a project TestProject and assign a new IssueType and Priority scheme to this project
- create a large number of projects (>500) using shared configuration from TestProject so that we have 500+ projects sharing the same configuration. Take care to create projects in a non-concurrent fashion (i.e. one-by-one) to not trigger the race condition.
- create multiple new projects with the same shared configuration concurrently (in parallel).
- notice that IssueTypeScheme and PriorityScheme for some projects may revert.
Since this is a race condition it may be possible to not trigger the behaviour described all the time so this may need a couple of trials. For recreation purposes, we can use a load testing tool like JMeter for steps (3) and (4) above. For (3) we set threadpool size to 1 to and for step (4) we set it to 5 with no ramp-up time so that we try to create 5 projects concurrently.
All new projects created and old projects have their schemes assigned to the schemes we've created at step (1)
For some projects, priority and/or issuetype schemes revert to default schemes.
Performing issueTypeScheme and priorityScheme changes, or operations that may trigger such changes automatically, like creating a project using shared configuration in a non-concurrent fashion (i.e. not in parallel but one action at a time)
Note: this bug report looks similar to JRASERVER-66625, however, the execution path mentioned in this ticket (see steps to reproduce on this ticket) is already fixed and does not cause this issue.