Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-16127

ORA-01795 Oracle DB Error when deleting a rapid board with >1000 card colors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 7.2.9, 7.2.10
    • AgileBoard

      Summary

      If an Agile board has more than 1000 card colors, you will receive an ORA-01795 DB error when attempting to delete the board and deletion will fail.

      Environment

      Observed with Oracle 12C using 12.1.102 driver

      Steps to Reproduce

      1. Configure JIRA to use an Oracle 12 database
      2. Create 1,000+ users
      3. Create an Agile Board
      4. Assign issues to each of the 1,000+ users.
      5. Set card coloring rules: Board > Configure > Card colors > Colors based on assignees
      6. Attempt to delete board

      Expected Results

      Board should be deleted without error.

      Actual Results

      Deletion fails, logging shows a DELETE SQL statement with more than 1,000 parameters for the IN clause:

      /rest/greenhopper/1.0/rapidview/9501 [n.java.ao.sql] DELETE FROM "AO_60DB71_CARDCOLOR" WHERE "ID" IN (?,?,<snip>,?,?)
      

      Resulting in stack:

      /rest/greenhopper/1.0/rapidview/9501 [c.a.g.w.rapid.view.RapidViewResource] Unable to complete GreenHopper REST method 
      com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
      Database:
      	- name:Oracle
      	- version:Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
      With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
      Advanced Analytics and Real Application Testing options
      	- minor version:1
      	- major version:12
      Driver:
      	- name:Oracle JDBC driver
      	- version:12.1.0.1.0
      java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000
      

      Workaround

      Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

      Manually delete card color entries in this board from the DB before removing board in UI:

      DELETE FROM AO_60DB71_CARDCOLOR WHERE rapid_view_id = XXXX;
      

      Where XXXX is the rapid board id as seen in the above stack trace, '9501' in this example.

       

      Switching card coloring to a different type (Issue Types, Priorities, Queries, None) will not resolve the issue.

            Unassigned Unassigned
            troyall TJ Royall
            Votes:
            10 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated: