Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-2041

Query will throw a NullPointerException if partition handling is enabled and the state is DEGRADED

XMLWordPrintable

    • CR1
    • Hide

      Install a two node cluster with the configuration attached
      Use the remote-query quickstart

      • add a person
      • query a know and unknown name
        -> it works
      • suspend one node (here the second not listed in client)
      • wait for the split detection 60sec
      • query an unknown person
        -> result NoMatch
      • query a known person
        -> NullPointerException server side
      Show
      Install a two node cluster with the configuration attached Use the remote-query quickstart add a person query a know and unknown name -> it works suspend one node (here the second not listed in client) wait for the split detection 60sec query an unknown person -> result NoMatch query a known person -> NullPointerException server side
    • JDG Sprint #15, JDG Sprint #16

      If a clustered (replicated) cache is indexed and the cluster will split and enter DEGRADED mode not all entries are available.
      But the index might be available local.
      So a query might find some entries local and some entries where not all owner are avaiable.
      This will end in an unexpected NullPointer instead of a AvailabilityException.

      Server will throw:
      ERROR [org.infinispan.interceptors.impl.InvocationContextInterceptor] (HotRodServerHandler-8-3) ISPN000136: Error executing command GetAllCommand, writing keys []: java.lang.NullPointerException
      at org.infinispan.interceptors.impl.CacheMgmtInterceptor.lambda$visitGetAllCommand$3(CacheMgmtInterceptor.java:120)
      at org.infinispan.interceptors.InvocationFinallyAction.apply(InvocationFinallyAction.java:18)
      at org.infinispan.interceptors.impl.SimpleAsyncInvocationStage.addCallback(SimpleAsyncInvocationStage.java:67)
      at org.infinispan.interceptors.InvocationStage.andFinally(InvocationStage.java:39)
      at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndFinally(BaseAsyncInterceptor.java:160)
      at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitGetAllCommand(CacheMgmtInterceptor.java:116)
      at org.infinispan.commands.read.GetAllCommand.acceptVisitor(GetAllCommand.java:57)
      at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndExceptionally(BaseAsyncInterceptor.java:126)
      at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:92)
      at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:59)
      at org.infinispan.interceptors.DDAsyncInterceptor.handleDefault(DDAsyncInterceptor.java:53)
      at org.infinispan.interceptors.DDAsyncInterceptor.visitGetAllCommand(DDAsyncInterceptor.java:112)
      at org.infinispan.commands.read.GetAllCommand.acceptVisitor(GetAllCommand.java:57)
      at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:49)
      at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invoke(AsyncInterceptorChainImpl.java:281)
      at org.infinispan.cache.impl.CacheImpl.getAll(CacheImpl.java:437)
      at org.infinispan.cache.impl.CacheImpl.getAll(CacheImpl.java:431)
      at org.infinispan.cache.impl.AbstractDelegatingAdvancedCache.getAll(AbstractDelegatingAdvancedCache.java:280)
      at org.infinispan.cache.impl.EncoderCache.getAll(EncoderCache.java:403)
      at org.infinispan.query.impl.EntityLoader.load(EntityLoader.java:42)
      at org.infinispan.query.impl.CacheQueryImpl.list(CacheQueryImpl.java:171)
      at org.infinispan.query.dsl.embedded.impl.EmbeddedLuceneQuery.listInternal(EmbeddedLuceneQuery.java:79)
      at org.infinispan.query.dsl.embedded.impl.EmbeddedLuceneQuery.list(EmbeddedLuceneQuery.java:73)
      at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.list(DelegatingQuery.java:102)
      at org.infinispan.query.remote.impl.QueryFacadeImpl.makeResponse(QueryFacadeImpl.java:73)
      at org.infinispan.query.remote.impl.QueryFacadeImpl.query(QueryFacadeImpl.java:62)
      at org.infinispan.server.hotrod.HotRodServer.query(HotRodServer.java:133)
      at org.infinispan.server.hotrod.ContextHandler.realRead(ContextHandler.java:143)
      at org.infinispan.server.hotrod.ContextHandler.lambda$channelRead0$0(ContextHandler.java:53)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
      at java.lang.Thread.run(Thread.java:748)

      Client side:
      > 5
      Enter person name pattern: test
      Jun 28, 2018 4:36:53 PM org.infinispan.client.hotrod.impl.protocol.Codec20 checkForErrorsInResponseStatus
      WARN: ISPN004005: Error received from the server: java.lang.NullPointerException
      org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=25 returned server error (status=0x85): java.lang.NullPointerException
      at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:420)
      at org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:167)
      at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:153)
      at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:60)
      at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:85)
      at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:31)
      at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:57)
      at org.infinispan.client.hotrod.impl.query.RemoteQuery.executeQuery(RemoteQuery.java:73)
      at org.infinispan.client.hotrod.impl.query.RemoteQuery.list(RemoteQuery.java:58)
      at org.jboss.as.quickstarts.datagrid.hotrod.query.AddressBookManager.queryPersonByName(AddressBookManager.java:149)
      at org.jboss.as.quickstarts.datagrid.hotrod.query.AddressBookManager.main(AddressBookManager.java:353)

      Other operations like get or keySet() will show the expected behaviour and the client side error is:
      > 9
      Jun 28, 2018 4:32:41 PM org.infinispan.client.hotrod.impl.protocol.Codec20 checkForErrorsInResponseStatus
      WARN: ISPN004005: Error received from the server: org.infinispan.partitionhandling.AvailabilityException: ISPN000305: Cluster is operating in degraded mode because of node failures.
      org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=15 returned server error (status=0x85): org.infinispan.partitionhandling.AvailabilityException: ISPN000305: Cluster is operating in degraded mode because of node failures.
      at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:420)
      at org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:167)
      at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:153)
      at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:60)
      at org.infinispan.client.hotrod.impl.operations.IterationStartOperation.executeOperation(IterationStartOperation.java:55)
      at org.infinispan.client.hotrod.impl.operations.IterationStartOperation.executeOperation(IterationStartOperation.java:21)
      at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:57)
      at org.infinispan.client.hotrod.impl.iteration.RemoteCloseableIterator.startInternal(RemoteCloseableIterator.java:127)
      at org.infinispan.client.hotrod.impl.iteration.RemoteCloseableIterator.start(RemoteCloseableIterator.java:140)
      at org.infinispan.client.hotrod.impl.RemoteCacheImpl.retrieveEntries(RemoteCacheImpl.java:164)
      at org.infinispan.client.hotrod.impl.RemoteCacheImpl.retrieveEntries(RemoteCacheImpl.java:170)
      at org.infinispan.client.hotrod.impl.RemoteCacheImpl.retrieveEntries(RemoteCacheImpl.java:175)
      at org.infinispan.client.hotrod.impl.protocol.Codec23.keyIterator(Codec23.java:27)
      at org.infinispan.client.hotrod.impl.RemoteCacheImpl$KeySet.iterator(RemoteCacheImpl.java:561)
      at org.jboss.as.quickstarts.datagrid.hotrod.query.AddressBookManager.printAllEntries(AddressBookManager.java:275)
      at org.jboss.as.quickstarts.datagrid.hotrod.query.AddressBookManager.main(AddressBookManager.java:361)

            dberinde@redhat.com Dan Berindei (Inactive)
            rhn-support-wfink Wolf Fink
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: