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

Prevent possible NPE in IndexingCompletion computation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF12, 11.1, 2021.0
    • Component/s: Streams
    • Backlog priority:
      900
    • Sprint:
      nxplatform 11.1.15, nxplatform 11.1.16
    • Story Points:
      2

      Description

      If for any reason the KeyValue has been reset it is possible to have a NPE

      2019-07-17T13:13:09,747 WARN [indexCompletionPool-00,in:0,inCheckpoint:0,out:0,lastRead:1563369187592,lastTimer:0,wm:0,loop:32,rebalance assigned] [org.nuxeo.lib.stream.computation.AbstractComputation] Computation: indexCompletion fails last record: done-00:+0, retrying ...
      java.lang.NullPointerException: null
      at org.nuxeo.elasticsearch.bulk.IndexCompletionComputation.refreshIndexIfNeeded(IndexCompletionComputation.java:74) ~[nuxeo-elasticsearch-core-10.10-HF08.jar:?]
      at org.nuxeo.elasticsearch.bulk.IndexCompletionComputation.processRecord(IndexCompletionComputation.java:67) ~[nuxeo-elasticsearch-core-10.10-HF08.jar:?]
      at org.nuxeo.lib.stream.computation.log.ComputationRunner.lambda$processRecordWithRetry$10(ComputationRunner.java:314) ~[nuxeo-stream-10.10-HF09.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:314) [nuxeo-stream-10.10-HF09.jar:?]
      at org.nuxeo.lib.stream.computation.log.ComputationRunner.processRecord(ComputationRunner.java:299) [nuxeo-stream-10.10-HF09.jar:?]
      at org.nuxeo.lib.stream.computation.log.ComputationRunner.processLoop(ComputationRunner.java:189) [nuxeo-stream-10.10-HF09.jar:?]
      at org.nuxeo.lib.stream.computation.log.ComputationRunner.run(ComputationRunner.java:148) [nuxeo-stream-10.10-HF09.jar:?]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_201]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_201]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201]
      at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]
      

      This kind of error blocks completely the processor and should be avoided.
      Just output an error if the command cannot be retrieved and continue, there is nothing else to do.

        Attachments

          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 - 1 day, 1 hour
                1d 1h