Will Burns created ISPN-11874:
---------------------------------
Summary: ClusterPublisher can get NPE during topology change with
ScatteredCache
Key: ISPN-11874
URL:
https://issues.redhat.com/browse/ISPN-11874
Project: Infinispan
Issue Type: Bug
Affects Versions: 11.0.0.Dev05
Reporter: Will Burns
Scattered cache can have topologies that don't have a primary owner for a segment.
Currently ClusterPublisher assumes every segment has a primary owner. We need to wait for
the next topology again if a segment doesn't yet have a primary owner.
Here is a sample stack trace of it occurring.
{code}
java.lang.NullPointerException
at
org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeCommand(JGroupsTransport.java:876)
at org.infinispan.remoting.rpc.RpcManagerImpl.invokeCommand(RpcManagerImpl.java:149)
at
org.infinispan.reactive.publisher.impl.ClusterPublisherManagerImpl$SubscriberHandler.sendInitialCommand(ClusterPublisherManagerImpl.java:1034)
at
org.infinispan.reactive.publisher.impl.InnerPublisherSubscription.accept(InnerPublisherSubscription.java:136)
at
io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnLifecycle$SubscriptionLambdaSubscriber.request(FlowableDoOnLifecycle.java:101)
at
io.reactivex.rxjava3.internal.subscriptions.SubscriptionArbiter.setSubscription(SubscriptionArbiter.java:99)
at
io.reactivex.rxjava3.internal.operators.flowable.FlowableRepeatUntil$RepeatSubscriber.onSubscribe(FlowableRepeatUntil.java:61)
at
io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnLifecycle$SubscriptionLambdaSubscriber.onSubscribe(FlowableDoOnLifecycle.java:73)
at
io.reactivex.rxjava3.processors.UnicastProcessor.subscribeActual(UnicastProcessor.java:481)
at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
at
io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnLifecycle.subscribeActual(FlowableDoOnLifecycle.java:38)
at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15696)
at
io.reactivex.rxjava3.internal.operators.flowable.FlowableScalarXMap$ScalarXMapFlowable.subscribeActual(FlowableScalarXMap.java:160)
at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15696)
at
io.reactivex.rxjava3.internal.operators.flowable.FlowableScalarXMap$ScalarXMapFlowable.subscribeActual(FlowableScalarXMap.java:160)
at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15696)
at
io.reactivex.rxjava3.internal.operators.flowable.FlowableRepeatUntil$RepeatSubscriber.subscribeNext(FlowableRepeatUntil.java:109)
at
io.reactivex.rxjava3.internal.operators.flowable.FlowableRepeatUntil$RepeatSubscriber.onComplete(FlowableRepeatUntil.java:88)
at
io.reactivex.rxjava3.internal.operators.flowable.FlowableFromCompletable$FromCompletableObserver.onComplete(FlowableFromCompletable.java:77)
at
io.reactivex.rxjava3.internal.jdk8.CompletableFromCompletionStage$CompletionStageHandler.accept(CompletableFromCompletionStage.java:64)
at
io.reactivex.rxjava3.internal.jdk8.CompletableFromCompletionStage$CompletionStageHandler.accept(CompletableFromCompletionStage.java:47)
at
io.reactivex.rxjava3.internal.jdk8.FlowableFromCompletionStage$BiConsumerAtomicReference.accept(FlowableFromCompletionStage.java:90)
at
io.reactivex.rxjava3.internal.jdk8.FlowableFromCompletionStage$BiConsumerAtomicReference.accept(FlowableFromCompletionStage.java:81)
at
java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
at
java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
at
java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at
java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
at
org.infinispan.statetransfer.StateTransferLockImpl.notifyTopologyInstalled(StateTransferLockImpl.java:137)
at
org.infinispan.statetransfer.StateConsumerImpl.lambda$onTopologyUpdate$1(StateConsumerImpl.java:342)
at
java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1106)
at
java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2235)
at
java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:143)
at
org.infinispan.statetransfer.StateConsumerImpl.onTopologyUpdate(StateConsumerImpl.java:322)
at
org.infinispan.scattered.impl.ScatteredStateConsumerImpl.onTopologyUpdate(ScatteredStateConsumerImpl.java:100)
at
org.infinispan.statetransfer.StateTransferManagerImpl.updateProviderAndConsumer(StateTransferManagerImpl.java:206)
at
org.infinispan.statetransfer.StateTransferManagerImpl.lambda$doTopologyUpdate$0(StateTransferManagerImpl.java:193)
at
java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1106)
at
java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2235)
at
java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:143)
at
org.infinispan.statetransfer.StateTransferManagerImpl.doTopologyUpdate(StateTransferManagerImpl.java:192)
at
org.infinispan.statetransfer.StateTransferManagerImpl.access$000(StateTransferManagerImpl.java:68)
at
org.infinispan.statetransfer.StateTransferManagerImpl$1.updateConsistentHash(StateTransferManagerImpl.java:123)
at
org.infinispan.topology.LocalTopologyManagerImpl.lambda$doHandleTopologyUpdate$12(LocalTopologyManagerImpl.java:399)
at
java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1106)
at
java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2235)
at
java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:143)
at
org.infinispan.topology.LocalTopologyManagerImpl.doHandleTopologyUpdate(LocalTopologyManagerImpl.java:388)
at
org.infinispan.topology.LocalTopologyManagerImpl.lambda$handleTopologyUpdate$8(LocalTopologyManagerImpl.java:312)
at
org.infinispan.topology.LocalTopologyManagerImpl.lambda$orderOnCache$24(LocalTopologyManagerImpl.java:737)
at
org.infinispan.util.concurrent.ActionSequencer.safeNonBlockingCall(ActionSequencer.java:57)
at org.infinispan.util.concurrent.ActionSequencer.access$400(ActionSequencer.java:32)
at
org.infinispan.util.concurrent.ActionSequencer$SequenceEntry.run(ActionSequencer.java:226)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)