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

Fix for import crash when arbitrary queue length of GenericMultiThreadedImporter.importTP exceeded

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.7.2
    • Fix Version/s: 5.9.3
    • Component/s: Excel Export

      Description

      In org.nuxeo.ecm.platform.importer.base.GenericThreadedImportTask#recursiveCreateDocumentFromNode, this call:

      GenericMultiThreadedImporter.getExecutor().execute(task);

      will crash the importer if the queue size of the ThreadPoolExecutor is > 100.

      There is an arbitrary limit placed on the importTP of 100.

      importTP = new ThreadPoolExecutor(nbThreads, nbThreads, 500L,TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(100),new NamedThreadFactory("Nuxeo-Importer-"));
      

      We have fixed this problem during a large import, by removing this arbitrary limitation (use standard constructor where queue length is limited to Integer.MAX). If the queue length must be kept to a small size, there are other alternatives. Perhaps if it must be kept, it should be passed as another parameter 'maxQueueLength'.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: