Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-20211

Fix big removal without path optimizations

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.10, 8.3
    • Fix Version/s: 7.10-HF14, 8.10
    • Component/s: Core IO

      Description

      When path optimizations are disabled and during removal at any given depth there is a total of more than 1000 documents, Oracle fails because we use an IN expression with too many values.

      stacktrace:

      used by: org.nuxeo.ecm.core.api.NuxeoException: Failed to get descendants
              at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.getChildrenNodeInfos(JDBCRowMapper.java:1475)
              at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.getDescendantsInfoIterative(JDBCRowMapper.java:1399)
              at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.getDescendantsInfo(JDBCRowMapper.java:1324)
              at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.remove(JDBCRowMapper.java:1312)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.doInvoke(JDBCMapperConnector.java:24)
              at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.invoke(JDBCMapperConnector.java:67)
              at com.sun.proxy.$Proxy54.remove(Unknown Source)
              at org.nuxeo.ecm.core.storage.sql.SoftRefCachingRowMapper.remove(SoftRefCachingRowMapper.java:429)
              at org.nuxeo.ecm.core.storage.sql.PersistenceContext.removeNode(PersistenceContext.java:856)
              at org.nuxeo.ecm.core.storage.sql.SessionImpl.removeNode(SessionImpl.java:1081)
              at org.nuxeo.ecm.core.storage.sql.ra.ConnectionImpl.removeNode(ConnectionImpl.java:239)
              at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.remove(SQLSession.java:600)
              at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.remove(SQLDocumentLive.java:157)
              at org.nuxeo.ecm.core.api.AbstractSession.removeNotifyOneDoc(AbstractSession.java:1377)
              at org.nuxeo.ecm.core.api.AbstractSession.removeDocument(AbstractSession.java:1347)
              at org.nuxeo.ecm.core.api.AbstractSession.removeDocuments(AbstractSession.java:1416)
              at org.nuxeo.ecm.core.trash.TrashServiceImpl.purgeDocuments(TrashServiceImpl.java:258)
              ...
      Caused by: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000
              ...
              at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.getChildrenNodeInfos(JDBCRowMapper.java:1435)
      

      org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.getDescendantsInfoIterative should use a maximum block size of sqlInfo.getMaximumArgsForIn()

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h