Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-8017

NPEx at org.apache.nifi.provenance.index.lucene. IndexDirectoryManager:486

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.13.0
    • None
    • None

    Description

      When upgrading to NiFi 1.10 I bumped into the following exception that blocks the Lucene index migration to successfully run:

      o.a.n.p.index.lucene.MigrateDefunctIndex Failed to migrate event index /data/disk6/nifi/provenance_repository/index-1600074261043 to /data/disk6/nifi/provenance_repository/temp-lucene-8-index-1600074261043 after successfully re-indexing 0 events
      java.lang.NullPointerException: null
      	at org.apache.nifi.provenance.index.lucene.IndexDirectoryManager.isParent(IndexDirectoryManager.java:486)
      	at org.apache.nifi.provenance.index.lucene.IndexDirectoryManager.isParent(IndexDirectoryManager.java:491)
      	at org.apache.nifi.provenance.index.lucene.IndexDirectoryManager.isParent(IndexDirectoryManager.java:491)
      	at org.apache.nifi.provenance.index.lucene.IndexDirectoryManager.isParent(IndexDirectoryManager.java:491)
      	at org.apache.nifi.provenance.index.lucene.IndexDirectoryManager.isParent(IndexDirectoryManager.java:491)
      	at org.apache.nifi.provenance.index.lucene.IndexDirectoryManager.isParent(IndexDirectoryManager.java:491)
      	at org.apache.nifi.provenance.index.lucene.IndexDirectoryManager.isParent(IndexDirectoryManager.java:491)
      	at org.apache.nifi.provenance.index.lucene.IndexDirectoryManager.getPartitionName(IndexDirectoryManager.java:477)
      	at org.apache.nifi.provenance.index.lucene.IndexDirectoryManager.insertIndexDirectory(IndexDirectoryManager.java:461)
      	at org.apache.nifi.provenance.index.lucene.IndexDirectoryManager.replaceDirectory(IndexDirectoryManager.java:438)
      	at org.apache.nifi.provenance.index.lucene.MigrateDefunctIndex.run(MigrateDefunctIndex.java:86)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748) 

      It seems that a null check is missing at [1]

       

      [1] https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/index/lucene/IndexDirectoryManager.java#L486

      Attachments

        Issue Links

          Activity

            People

              denes Denes Arvay
              denes Denes Arvay
              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 - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m