Issue Summary
Adding a user to a role takes a long time as the number of users in that project role grows.
This can be particularly impactful for environments that have public signup enabled and projects in which JSM is configured so anyone can raise an issue by email.
Steps to Reproduce
- Install a vanilla instance of Jira Service Management Data Center (JSM DC) on version 5.12.latest.
- The instance should have 2 or more nodes to trigger the bug.
- Create a sample Business (Core) project.
- Run the following script.
JIRA_BASE_URL=https://myjira.com JIRA_ADMIN_USRNAME=myusername JIRA_ADMIN_PWD=mypassword USERNAME_PREFIX=sampleuser PROJECT_KEY=SCRUM1 for i in $(seq 1 1000); do new_username=${USERNAME_PREFIX}${i} new_password=${USERNAME_PREFIX}${i} new_email="${USERNAME_PREFIX}${i}@user.com" new_displayname=${USERNAME_PREFIX}${i} USER_KEY=$(curl -s -k -L -XPOST \ -H 'Content-Type: application/json' \ -u ${JIRA_ADMIN_USRNAME}:${JIRA_ADMIN_PWD} \ ${JIRA_BASE_URL}'/rest/api/latest/user' \ -d '{"name": "'${new_username}'","password": "'${new_password}'","emailAddress": "'${new_email}'","displayName": "'${new_displayname}'","applicationKeys": ["jira-software"]}' | jq -r '.key') echo ${USER_KEY} time curl -s -o /dev/null ${JIRA_BASE_URL}'/rest/projectconfig/latest/roles/'${PROJECT_KEY}'/10002' -X POST \ -u ${JIRA_ADMIN_USRNAME}:${JIRA_ADMIN_PWD} \ -H 'Content-Type: application/json' \ --data-raw '{"groups":[],"users":["'${USER_KEY}'"]}' done
- This script will sequentially create a user record and then add it to a project role.
- Note the time doesn't increase and is mostly constant.
- Create a sample ITSM project.
- Run the following script.
JIRA_BASE_URL=https://myjira.com PROJECT_KEY=ITSM1 for i in $(seq 1 2000); do time curl -s \ ${JIRA_BASE_URL}'/rest/servicedesk/1/pages/people/customers/pagination/'${PROJECT_KEY}'/invite' \ -X POST \ -H 'Authorization: Bearer PAT-key' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Content-Type: application/json' \ --data-raw '{"emails":["customer'${i}'@customer.net"]}' done
- This script will sequentially create add a customer to the project.
- Note the time doesn't increase and is mostly constant.
- Install a vanilla instance of JSM DC 10.3.latest.
- The instance should have 2 or more nodes to trigger the bug.
- Run the same steps detailed above.
Expected Results
The time to add a new user to a project role or to add a customer remains similar to JSM DC 5.12 and remains mostly constant with more users.
Actual Results
The time to add a new user to a project role or to add a customer continuously increases with more users in the project.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available
- is related to
-
JRASERVER-78918 Adding a user to a role is slow for projects with many user role assignments in a different role
-
- Gathering Impact
-
- mentioned in
-
Page Loading...