Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-13398

NPE in IgniteServiceProcessor when destroying a cache

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.8, 2.8.1
    • 2.10, 2.9.1
    • None
    • Fixed NPE happening when destroying the cache and there is a running service

    Description

      Try running the attached reproducer: Main.java. The following exception is printed to the logs:

      Sep 03, 2020 12:13:58 PM org.apache.ignite.logger.java.JavaLogger error
      SEVERE: Failed to notify direct custom event listener: DynamicCacheChangeBatch [id=c1d6e335471-6bafb375-9d3e-487a-974d-35927ae02c04, reqs=ArrayList [DynamicCacheChangeRequest [cacheName=foo, hasCfg=false, nodeId=5e41fda8-e749-432c-9832-7b1c6ee3d0c8, clientStartOnly=false, stop=true, destroy=false, disabledAfterStartfalse]], exchangeActions=ExchangeActions [startCaches=null, stopCaches=[foo], startGrps=[], stopGrps=[foo, destroy=true], resetParts=null, stateChangeRequest=null], startCaches=false]
      java.lang.NullPointerException
      	at org.apache.ignite.internal.processors.service.IgniteServiceProcessor.lambda$processDynamicCacheChangeRequest$6(IgniteServiceProcessor.java:1694)
      	at java.util.Collection.removeIf(Collection.java:414)
      	at org.apache.ignite.internal.processors.service.IgniteServiceProcessor.processDynamicCacheChangeRequest(IgniteServiceProcessor.java:1691)
      	at org.apache.ignite.internal.processors.service.IgniteServiceProcessor.access$200(IgniteServiceProcessor.java:108)
      	at org.apache.ignite.internal.processors.service.IgniteServiceProcessor$3.onCustomEvent(IgniteServiceProcessor.java:232)
      	at org.apache.ignite.internal.processors.service.IgniteServiceProcessor$3.onCustomEvent(IgniteServiceProcessor.java:229)
      	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.onDiscovery0(GridDiscoveryManager.java:665)
      	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.lambda$onDiscovery$0(GridDiscoveryManager.java:528)
      	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryMessageNotifierWorker.body0(GridDiscoveryManager.java:2608)
      	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryMessageNotifierWorker.body(GridDiscoveryManager.java:2646)
      	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
      	at java.lang.Thread.run(Thread.java:748)
      

      Attachments

        1. Main.java
          2 kB
          Denis Mekhanikov

        Issue Links

          Activity

            People

              kazakov Ilya Kazakov
              dmekhanikov Denis Mekhanikov
              Votes:
              0 Vote for this issue
              Watchers:
              5 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