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

Fix NPE in updateRealACL

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.10, 2021
    • Fix Version/s: 10.10-HF59, 2021.17
    • Component/s: Core MongoDB
    • Release Notes Summary:
      UpdateReadAcl action no longer produces error on deleted document
    • Team:
      PLATFORM
    • Sprint:
      nxplatform #56, nxplatform #57
    • Story Points:
      2

      Description

      We have observed that in some situation we try to update the read acl of non existing document, which produces the NPE below:

      java.lang.NullPointerException: null
      	at org.nuxeo.ecm.core.storage.dbs.DBSTransactionState.updateDocumentReadAclsNoCache(DBSTransactionState.java:698) ~[nuxeo-core-storage-dbs-2021.13.7.jar:?]
      	at org.nuxeo.ecm.core.storage.dbs.DBSTransactionState.lambda$updateReadACLs$3(DBSTransactionState.java:676) ~[nuxeo-core-storage-dbs-2021.13.7.jar:?]
      	at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
      	at org.nuxeo.ecm.core.storage.dbs.DBSTransactionState.updateReadACLs(DBSTransactionState.java:676) ~[nuxeo-core-storage-dbs-2021.13.7.jar:?]
      	at org.nuxeo.ecm.core.storage.dbs.DBSSession.updateReadACLs(DBSSession.java:1314) ~[nuxeo-core-storage-dbs-2021.13.7.jar:?]
      	at org.nuxeo.ecm.core.api.AbstractSession.updateReadACLs(AbstractSession.java:647) ~[nuxeo-core-2021.13.7.jar:?]
      	at org.nuxeo.ecm.core.storage.dbs.action.UpdateReadAclsAction$UpdateReadAclsComputation.compute(UpdateReadAclsAction.java:62) ~[nuxeo-core-storage-dbs-2021.13.7.jar:?]
      	at org.nuxeo.ecm.core.bulk.action.computation.AbstractBulkComputation.lambda$processBatchOfDocuments$3(AbstractBulkComputation.java:147) ~[nuxeo-core-bulk-2021.13.7.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.lambda$runInTransaction$4(TransactionHelper.java:628) ~[nuxeo-runtime-jtajca-2021.13.7.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.runInTransaction(TransactionHelper.java:661) ~[nuxeo-runtime-jtajca-2021.13.7.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.runInTransaction(TransactionHelper.java:628) ~[nuxeo-runtime-jtajca-2021.13.7.jar:?]
      	at org.nuxeo.ecm.core.bulk.action.computation.AbstractBulkComputation.processBatchOfDocuments(AbstractBulkComputation.java:141) ~[nuxeo-core-bulk-2021.13.7.jar:?]
      	at org.nuxeo.ecm.core.bulk.action.computation.AbstractBulkComputation.processRecord(AbstractBulkComputation.java:102) ~[nuxeo-core-bulk-2021.13.7.jar:?]
      	at org.nuxeo.lib.stream.computation.log.ComputationRunner.lambda$processRecordWithRetry$10(ComputationRunner.java:468) ~[nuxeo-stream-2021.13.7.jar:?]
      	at net.jodah.failsafe.Functions$10.call(Functions.java:252) ~[failsafe-1.1.0.jar:1.1.0]
      	at net.jodah.failsafe.SyncFailsafe.call(SyncFailsafe.java:145) [failsafe-1.1.0.jar:1.1.0]
      	at net.jodah.failsafe.SyncFailsafe.run(SyncFailsafe.java:81) [failsafe-1.1.0.jar:1.1.0]
      	at org.nuxeo.lib.stream.computation.log.ComputationRunner.processRecordWithRetry(ComputationRunner.java:468) [nuxeo-stream-2021.13.7.jar:?]
      	at org.nuxeo.lib.stream.computation.log.ComputationRunner.processRecordWithTracing(ComputationRunner.java:420) [nuxeo-stream-2021.13.7.jar:?]
      	at org.nuxeo.lib.stream.computation.log.ComputationRunner.processRecord(ComputationRunner.java:411) [nuxeo-stream-2021.13.7.jar:?]
      	at org.nuxeo.lib.stream.computation.log.ComputationRunner.processLoop(ComputationRunner.java:272) [nuxeo-stream-2021.13.7.jar:?]
      	at org.nuxeo.lib.stream.computation.log.ComputationRunner.run(ComputationRunner.java:206) [nuxeo-stream-2021.13.7.jar:?]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
      	at java.lang.Thread.run(Thread.java:829) [?:?]
      

      We should check that the document (here the state) exists before trying to update its ACLs.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                PagerDuty

                Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.