Steps to reproduce:
- Setup Camunda with a SQL Server as a database
- Deploy a BPMN process -> creates a deployment foo with process definition bar
- Start more than 2100 process instances of process definition bar
- Delete deployment foo (with cascade true)
Expected behavior:
- The deployment got deleted successfully.
Observed Behavior:
- The deletion of the deployment fails with the following exception:
Could not delete deployment: ENGINE-03083 Unexpected exception while executing database operations with message ' ### Error flushing statements. Cause: 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. ### Cause: 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.'...
Hints:
- The SQL Server has a limit of 2100 parameters that can be passed.
- Check if this is necessary for secondary entities as well (e.g. process variables)
- If we need a large data set to test this, consider implementing the tests in the large-data test suite, not the core engine unit tests
Solution Ideas:
- Divide the deletion of entities in smaller chunks.