-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 8.20.2
-
Component/s: Plan
-
None
-
3
-
Severity 3 - Minor
Issue Summary
This is reproducible on Data Center: (yes)
Clean up task executed to remove planteams/planskills with non-existent teams/skills is failing with the following error:
SQLServerException for delete from "dbo"."AO_D9132D_PLANTEAM" where "AO_D9132D_PLANTEAM"."TEAM_ID" not in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, [... there is a ? for each team] ?,?,?) 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.
Steps to Reproduce
- Add more than 2100 teams to the AO_82B313_TEAM table. For instance, on the Customer site, they had 5642 teams configured
- Create some plans and add some teams to the plan, they will be added to the AO_D9132D_PLANTEAM table
- Restart Jira
Expected Results
Clean up task will check the table AO_D9132D_PLANTEAM for teams that do not exist more on AO_82B313_TEAM and remove them.
Actual Results
The below exception is thrown in the atlassian-jira.log file:
2022-02-08 18:49:08,363-0500 localhost-startStop-1 ERROR [c.a.r.c.b.jira.lifecycle.UpgradeTaskServiceBridgeImpl] Unexpected error during task 'Clean up: removing planteams/planskills with non-existent teams/skills'. 2022-02-08 18:49:08,365-0500 localhost-startStop-1 ERROR [c.a.r.c.b.jira.lifecycle.UpgradeTaskServiceBridgeImpl] Caught SQLServerException for delete from "dbo"."AO_D9132D_PLANTEAM" where "AO_D9132D_PLANTEAM"."TEAM_ID" not in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, [...] ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) com.querydsl.core.QueryException: Caught SQLServerException for delete from "dbo"."AO_D9132D_PLANTEAM" where "AO_D9132D_PLANTEAM"."TEAM_ID" not in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, [...] ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:50) at com.querydsl.sql.Configuration.translate(Configuration.java:459) at com.querydsl.sql.dml.SQLDeleteClause.execute(SQLDeleteClause.java:222) at com.atlassian.rm.jpo.plugin.lifecycle.JpoUpgradeTask016.taskExecution(JpoUpgradeTask016.java:58) at com.atlassian.rm.common.plugin.lifecycle.AbstractTransactionalUpgradeTask.lambda$execute$0(AbstractTransactionalUpgradeTask.java:27) at com.atlassian.rm.common.persistence.DefaultDatabaseProvider.lambda$run$1(DefaultDatabaseProvider.java:32) at com.atlassian.rm.common.persistence.env.JiraDatabaseProvider.lambda$execute$0(JiraDatabaseProvider.java:34) at com.atlassian.rm.common.bridges.jira.persistence.JiraDatabaseProviderBridgeImpl.execute(JiraDatabaseProviderBridgeImpl.java:59) at com.atlassian.rm.common.persistence.env.JiraDatabaseProvider.execute(JiraDatabaseProvider.java:34) at com.atlassian.rm.common.persistence.DefaultDatabaseProvider.run(DefaultDatabaseProvider.java:30) at com.atlassian.rm.common.plugin.lifecycle.AbstractTransactionalUpgradeTask.execute(AbstractTransactionalUpgradeTask.java:24) at com.atlassian.rm.common.bridges.jira.lifecycle.UpgradeTaskServiceBridgeImpl.tryTriggerUpgradeTaskExecution(UpgradeTaskServiceBridgeImpl.java:28) at com.atlassian.rm.common.plugin.AwesomeLauncher.onLifecycleEvent(AwesomeLauncher.java:128) at com.atlassian.rm.common.plugin.AwesomeLauncher.onStart(AwesomeLauncher.java:94) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$1.accept(DefaultLifecycleManager.java:265) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$1.accept(DefaultLifecycleManager.java:262) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyLifecyleAware(DefaultLifecycleManager.java:291) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyOnStartIfStartedAndEnabled(DefaultLifecycleManager.java:261) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyLifecycleAwares(DefaultLifecycleManager.java:246) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyStartableLifecycleAwares(DefaultLifecycleManager.java:224) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.startIfApplicationSetup(DefaultLifecycleManager.java:212) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.start(DefaultLifecycleManager.java:203) at com.atlassian.sal.jira.lifecycle.JiraLifecycleManager.onJiraStart(JiraLifecycleManager.java:65) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:85) at com.atlassian.event.internal.LockFreeEventPublisher$Publisher.dispatch(LockFreeEventPublisher.java:220) at com.atlassian.event.internal.LockFreeEventPublisher.publish(LockFreeEventPublisher.java:96) at com.atlassian.plugin.event.impl.DefaultPluginEventManager.broadcast(DefaultPluginEventManager.java:90) at com.atlassian.jira.upgrade.PluginUpgradeLauncher.start(PluginUpgradeLauncher.java:29) at com.atlassian.jira.startup.ActiveServicesLauncher.start(ActiveServicesLauncher.java:52) at com.atlassian.jira.startup.DefaultJiraLauncher.postDBActivated(DefaultJiraLauncher.java:170) at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$postDbLaunch$2(DefaultJiraLauncher.java:144) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:307) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseActivated(DatabaseConfigurationManagerImpl.java:202) at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:135) at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$start$0(DefaultJiraLauncher.java:102) at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:31) at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:100) at com.atlassian.jira.startup.LauncherContextListener.initSlowStuff(LauncherContextListener.java:154) at com.atlassian.jira.startup.LauncherContextListener.initSlowStuffInBackground(LauncherContextListener.java:139) at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:101) ... 5 filtered at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 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. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1632) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:602) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:524) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7418) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:247) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:222) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:473) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98) at com.atlassian.jira.ofbiz.sql.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:47) at com.atlassian.jira.diagnostic.connection.DiagnosticPreparedStatement.lambda$executeUpdate$7(DiagnosticPreparedStatement.java:69) at com.atlassian.diagnostics.internal.platform.monitor.db.DefaultDatabaseDiagnosticsCollector.recordExecutionTime(DefaultDatabaseDiagnosticsCollector.java:70) at com.atlassian.jira.diagnostic.connection.DatabaseDiagnosticsCollectorDelegate.recordExecutionTime(DatabaseDiagnosticsCollectorDelegate.java:55) at com.atlassian.jira.diagnostic.connection.DiagnosticPreparedStatement.executeUpdate(DiagnosticPreparedStatement.java:69) at com.querydsl.sql.dml.SQLDeleteClause.execute(SQLDeleteClause.java:208) ... 52 more
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available