-
Bug
-
Resolution: Fixed
-
Highest
-
8.19.1, 8.20.0, 8.20.1, 8.21.0, 8.20.3, 8.20.11
-
8.19
-
4
-
Severity 2 - Major
-
46
-
Issue Summary
Server Error while assigning Issue or performing mentioned Search in comment
Steps to Reproduce
- Configure Jira 8.20.1 instance connected to mssql
- Enable nested groups for the local Jira directory
- Create a hierarchy of nested groups that were members of each other like the following:
- Nested16 -> nested15 -> nested14 and so forth
- Added several users as members to nested group 16.
- Configured project permissions to only allow assignable users from group nested1.
- Attempt to assign user or perform mention search in comment
Expected Results
User should be able to Assign user and also perform @mention search in Comment.
Actual Results
Assigning and performing mention search in comment fails with below error
Error faced by user
The below exception is thrown in the atlassian-jira.log file:
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
Workaround
- Modify project permissions if it's just a few projects
- Disable nested groups entirely if it's happening all over the place
Additional Information
With the above environment in place we can see the following query is executed whenever the search occurs:
(@P0 nvarchar(4000),@P1 nvarchar(4000),@P2 nvarchar(4000),@P3 nvarchar(4000),@P4 nvarchar(4000),@P5 nvarchar(4000),@P6 nvarchar(4000),@P7 nvarchar(4000),@P8 nvarchar(4000),@P9 nvarchar(4000),@P10 nvarchar(4000),@P11 nvarchar(4000),@P12 nvarchar(4000),@P13 nvarchar(4000),@P14 nvarchar(4000),@P15 nvarchar(4000),@P16 nvarchar(4000),@P17 bigint,@P18 int,@P19 int,@P20 bigint)select CWD_USER.id, CWD_USER.directory_id, CWD_USER.user_name, CWD_USER.lower_user_name, CWD_USER.active, CWD_USER.created_date, CWD_USER.updated_date, CWD_USER.first_name, CWD_USER.lower_first_name, CWD_USER.last_name, CWD_USER.lower_last_name, CWD_USER.display_name, CWD_USER.lower_display_name, CWD_USER.email_address, CWD_USER.lower_email_address, CWD_USER.credential, CWD_USER.deleted_externally, CWD_USER.external_id from dbo.cwd_user CWD_USER where (CWD_USER.lower_user_name in (select MEMBERSHIP.lower_child_name from dbo.cwd_membership MEMBERSHIP where MEMBERSHIP.membership_type = @P0 and (MEMBERSHIP.lower_parent_name in (@P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16)))) and CWD_USER.directory_id = @P17 and CWD_USER.active = @P18 order by CWD_USER.lower_display_name asc offset @P19 rows fetch next @P20 rows only
The following portion of the where clause keeps expanding in number of parameters as the nested tree grows:
and (MEMBERSHIP.lower_parent_name in (@P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16)
Here we've added in nested17 into the hierarchy:
and (MEMBERSHIP.lower_parent_name in (@P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17)
And now we have 22 in the hierarchy:
and (MEMBERSHIP.lower_parent_name in (@P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20, @P21, @P22)
We can continue to grow this list of parameters by adding new groups into the hierarchy until we hit:
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
Looks like we made a lot of changes to how the lookup occurs as a part of https://jira.atlassian.com/browse/JRASERVER-72101, which may have introduced this regression in cases of deep nested group relationships.
- is related to
-
JRASERVER-73044 The status property key jira.permission.assignable.group is ignored
- Gathering Impact
- relates to
-
JRASERVER-72101 Performance regression in user lookup
- Closed
- is blocked by
-
PS-86611 Loading...
- is duplicated by
-
UCACHE-173 Loading...