Uploaded image for project: 'Xray for Jira'
  1. Xray for Jira
  2. XRAY-8705

MSSQL may fail with insufficient resource while deleting test runs

    XporterXMLWordPrintable

Details

    • Xray 2024 S2, Xray 2024 S3
    • OK

    Description

      This may happen in the following actions:

      • Integrity checker: Fix invalid test runs, Fix invalid step mementos
      • On project delete

      In the logs you may see some errors. From our tests the error that appears will depend on the amount of data.

      With 50K invalid 1 step mementos:

      ERROR admin 701x52226x1 1yzgbmd 172.19.0.1 /secure/project/DeleteProject.jspa [c.x.raven.repository.ClusterSupport] Failed to call active objects command
      com.xpandit.raven.exceptions.RavenSQLException: The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.
      	at com.xpandit.raven.dao.impl.DAOContextImpl.executeUpdate(DAOContextImpl.java:264)
      	at com.xpandit.raven.repository.TestStepResultRepositoryImpl.bulkDeleteStepAttachmentsGivenMementos(TestStepResultRepositoryImpl.java:1181)
      	at com.xpandit.raven.repository.TestStepResultRepositoryImpl.bulkDeleteStepResultsGivenMementos(TestStepResultRepositoryImpl.java:1100)
      	at com.xpandit.raven.repository.TestStepResultRepositoryImpl.deleteTestStepMementos(TestStepResultRepositoryImpl.java:756)
      	at com.xpandit.raven.repository.TestStepResultRepositoryImpl.resolveBulkDeleteOfTestRuns(TestStepResultRepositoryImpl.java:747)
      	at com.xpandit.raven.repository.TestStepResultRepositoryImpl.lambda$bulkDeleteOfTestRuns$15(TestStepResultRepositoryImpl.java:738)
      

      With 300K invalid step mementos:

      ERROR admin 54x198487x1 1vqe87h 172.19.0.1 /secure/project/DeleteProject.jspa [c.x.r.service.impl.IntegrityServiceImpl] Error while fixing integrity violations of Xray's internal Active Objects
      net.java.ao.ActiveObjectsException: com.xpandit.raven.exceptions.RavenSQLException: There is insufficient system memory in resource pool 'default' to run this query.
      	at com.xpandit.raven.repository.ClusterSupport.callWithClusterLock(ClusterSupport.java:37)
      	at com.xpandit.raven.repository.TestStepResultRepositoryImpl.bulkDeleteOfTestRuns(TestStepResultRepositoryImpl.java:736)
      (...)
      Caused by: com.xpandit.raven.exceptions.RavenSQLException: There is insufficient system memory in resource pool 'default' to run this query.
      	at com.xpandit.raven.dao.impl.DAOContextImpl.executeUpdate(DAOContextImpl.java:264) [?:?]
      	at com.xpandit.raven.repository.TestStepResultRepositoryImpl.bulkDeleteStepAttachmentsGivenMementos(TestStepResultRepositoryImpl.java:1119) [?:?]
      

      1: Invalid step memento is invalid data about test steps in test runs, where the test run is also invalid i.e associated to a test or test execution issue which no longer exists in Jira.

       

      Also can fail while deleting TestCallMementos:

      cause=com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
          Database:
          	- name:Microsoft SQL Server
          	- version:14.00.3445
          	- minor version:0
          	- major version:14
          Driver:
          	- name:Microsoft JDBC Driver 4.0 for SQL Server
          	- version:4.0.2206.100
          
          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., stacktrace=com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
              Database:
              	- name:Microsoft SQL Server
              	- version:14.00.3445
              	- minor version:0
              	- major version:14
              Driver:
              	- name:Microsoft JDBC Driver 4.0 for SQL Server
              	- version:4.0.2206.100
              
              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.atlassian.activeobjects.internal.EntityManagedActiveObjects.find(EntityManagedActiveObjects.java:152) [?:?]
          	at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.find(TenantAwareActiveObjects.java:302) [?:?]
          	at jdk.internal.reflect.GeneratedMethodAccessor6070.invoke(Unknown Source) [?:?]
          	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [?:?]
          	at java.base/java.lang.reflect.Method.invoke(Unknown Source) [?:?]
          	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) [spring-aop-5.3.10.jar:5.3.10]
          	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) [?:?]
          	(...)
          	at com.sun.proxy.$Proxy5381.find(Unknown Source) [?:?]
          	at com.xpandit.raven.repository.modulartests.TestCallMementoRepositoryImpl.getTestCallMementoIds(TestCallMementoRepositoryImpl.java:311) [?:?]
          	at com.xpandit.raven.repository.modulartests.TestCallMementoRepositoryImpl.deleteTestCallMementos(TestCallMementoRepositoryImpl.java:153) [?:?]
      

      Attachments

        Activity

          People

            patricia.mateo Patricia Mateo
            dmdu David Duarte
            Júlio Gonçalves, Patricia Mateo
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: