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

Fix possible ConcurrentModificationException in makeBlob computation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2023.7, 2021.49
    • Component/s: Bulk

      Description

      While we are iterating on counters HashMap#keySet the map is updated on finishBlob triggering a concurrentModificationException with a retry:

      Computation: bulk/makeBlob fails last record: bulk-makeBlob-00:+5164, retrying ...
      
      java.util.ConcurrentModificationException: null
      	at java.util.HashMap$KeySet.forEach(HashMap.java:932) ~[?:?]
      	at org.nuxeo.ecm.core.bulk.action.computation.MakeBlob.processTimer(MakeBlob.java:108) ~[nuxeo-core-bulk-2021.45.8.jar:?]
      	at org.nuxeo.lib.stream.computation.log.ComputationRunner.lambda$processTimerWithRetry$6(ComputationRunner.java:418) ~[nuxeo-stream-2021.45.8.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.processTimerWithRetry(ComputationRunner.java:418) ~[nuxeo-stream-2021.45.8.jar:?]
      

      This is not a concurrency problem just modifying the map outside of an iterator.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: