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

NPE occurs during CQ registration with cache node filter specified.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      NPE occurs during CQ registration if
      1. Node that starts cache does not match cache node filter.
      2. CQ is started on node that matches cache node filter.

      Exception:

      [2020-04-06 12:49:23,863][ERROR][disco-notifier-worker-#36%ignite.CacheContinousQueryProjectionPredicateTest0%][GridDiscoveryManager] Failed to notify direct custom event listener: StartRoutineDiscoveryMessage [startReqData=StartRequestData [prjPred=o.a.i.CacheContinousQueryProjectionPredicateTest$$Lambda$514/265747429@3529eb45, clsName=o.a.i.CacheContinousQueryProjectionPredicateTest$$Lambda$514/265747429, depInfo=GridDeploymentInfoBean [clsLdrId=9ddf4ee4171-9647add4-b66c-4a10-9bb7-f5ecf7d00001, depMode=SHARED, userVer=0, locDepOwner=false, participants=null], hnd=CacheContinuousQueryHandler [returnValTrans=o.a.i.i.processors.cache.query.continuous.CacheContinuousQueryHandler$1@7dfdf92a, cacheName=default, rmtFilter=null, rmtFilterDep=null, internal=false, notifyExisting=false, oldValRequired=true, sync=false, ignoreExpired=true, taskHash=0, skipPrimaryCheck=false, locOnly=false, keepBinary=false, ackBuf=null, cacheId=1544803905, initTopVer=null, nodeLeft=false, ignoreClsNotFound=false, nodeId=null, routineId=null], bufSize=1, interval=0, autoUnsubscribe=true], keepBinary=false, deserEx=null, routineId=b2b363ed-a9d7-4e4e-a91d-f17e09ba7d7f]
      java.lang.NullPointerException
      	at org.apache.ignite.internal.processors.continuous.StartRoutineDiscoveryMessage.addUpdateCounters(StartRoutineDiscoveryMessage.java:95)
      	at org.apache.ignite.internal.processors.continuous.StartRoutineDiscoveryMessage.addUpdateCounters(StartRoutineDiscoveryMessage.java:109)
      	at org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.processStartRequest(GridContinuousProcessor.java:1482)
      	at org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.access$400(GridContinuousProcessor.java:117)
      	at org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$2.onCustomEvent(GridContinuousProcessor.java:220)
      	at org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$2.onCustomEvent(GridContinuousProcessor.java:211)
      	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.onDiscovery0(GridDiscoveryManager.java:670)
      	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.lambda$onDiscovery$0(GridDiscoveryManager.java:533)
      	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryMessageNotifierWorker.body0(GridDiscoveryManager.java:2635)
      	at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryMessageNotifierWorker.body(GridDiscoveryManager.java:2673)
      	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
      	at java.lang.Thread.run(Thread.java:748)
      

      Reproducer:

      /** */
      @Test
      public void test() throws Exception {
          IgniteEx filteredNode = startGrid(0);
      
          IgniteEx cacheStoreNode = startGrid(1);
      
          filteredNode.cluster().state(ClusterState.ACTIVE);
      
          UUID filteredNodeId = filteredNode.localNode().id();
      
          filteredNode.createCache(new CacheConfiguration<>(DEFAULT_CACHE_NAME)
              .setNodeFilter(node -> !node.id().equals(filteredNodeId)));
      
          ContinuousQuery<Object, Object> qry = new ContinuousQuery<>();
      
          qry.setLocalListener(evts -> {
              //No-op.
          });
      
          cacheStoreNode.cache(DEFAULT_CACHE_NAME).query(qry);
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                PetrovMikhail Mikhail Petrov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: