[JBoss JIRA] (ISPN-7806) QueryInterceptor should not load entries from DC but context
by Gustavo Fernandes (JIRA)
[ https://issues.jboss.org/browse/ISPN-7806?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes updated ISPN-7806:
------------------------------------
Fix Version/s: 9.2.0.Beta1
(was: 9.2.0.Beta2)
> QueryInterceptor should not load entries from DC but context
> ------------------------------------------------------------
>
> Key: ISPN-7806
> URL: https://issues.jboss.org/browse/ISPN-7806
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 9.0.0.Final
> Reporter: Radim Vansa
> Assignee: Gustavo Fernandes
> Fix For: 9.2.0.Beta1
>
>
> Currently in {{visitPrepareCommand}} the query interceptor is loading data directly from data container. That's wrong - if the entry is passivated/evicted, the previous value is incorrect.
> As the data is not loaded (from DC/persistence) at current QI position, we should move QueryInterceptor after EntryWrappingInterceptor, CacheLoaderInterceptor -and xDistributionInterceptor (which may load the data from remote node),- and load the previous entry from context instead. The same approach should be taken for non-tx command, rather than relying on their return value.
> **EDIT**: we should not move it below xDistributionInterceptor because on backup owner (which may be write-owner but not a read-owner) we would retrieve the updated value (affected by the current command), not the previous one.
> There will still be issues if the command has SKIP_CACHE_LOAD flag: I suggest warning message if it doesn't have SKIP_INDEXING flag as well.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 12 months
[JBoss JIRA] (ISPN-9070) Listener error on ClusteredLock remove
by Frank Montyne (JIRA)
Frank Montyne created ISPN-9070:
-----------------------------------
Summary: Listener error on ClusteredLock remove
Key: ISPN-9070
URL: https://issues.jboss.org/browse/ISPN-9070
Project: Infinispan
Issue Type: Bug
Components: Clustered Locks
Affects Versions: 9.2.1.Final
Environment: Mac OSX Java8
Reporter: Frank Montyne
Priority: Minor
When removing a lock I get an error on the attached listener. This error is not present in 9.2.0.Final. The stack trace is included below. There seems to be a race condition: the lock is already deleted but the listener still tries to access it.
This is the code, the error is triggered on lockManager.remove(lockName).
CompletableFuture<Boolean> future = {color:#d04437}lockManager.remove(lockName){color};
try {
future.get();
}
catch (InterruptedException | ExecutionException e) {
logger.error(String.format("Failed to destroy lock %s", lockName));
}
10:46:05.463 [main] ERROR org.infinispan.lock.impl.lock.ClusteredLockImpl - LOCK[indexSetManagementLock] Exception on lock request LockRequestHolder{name=indexSetManagementLock, requestId=22418e27-912f-4ff2-9e8b-41e6d0956638, requestor=infinispan-cache-test-service1-51563 (flags=0), rack-id=test-rack1, machine-id=test-server1), completed=true, completedExceptionally=false}
org.infinispan.lock.exception.ClusteredLockException: ISPN029001: The lock was deleted.
at org.infinispan.lock.impl.lock.ClusteredLockImpl$LockReleasedListener.entryRemoved(ClusteredLockImpl.java:248) ~[infinispan-clustered-lock-9.2.1.Final.jar:9.2.1.Final]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
at org.infinispan.notifications.impl.AbstractListenerImpl$ListenerInvocationImpl.lambda$invoke$1(AbstractListenerImpl.java:382) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:20) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.notifications.impl.AbstractListenerImpl$ListenerInvocationImpl.invoke(AbstractListenerImpl.java:404) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.notifications.cachelistener.CacheNotifierImpl$BaseCacheEntryListenerInvocation.doRealInvocation(CacheNotifierImpl.java:1567) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.notifications.cachelistener.CacheNotifierImpl$BaseCacheEntryListenerInvocation.doRealInvocation(CacheNotifierImpl.java:1563) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.notifications.cachelistener.CacheNotifierImpl$BaseCacheEntryListenerInvocation.invokeNoChecks(CacheNotifierImpl.java:1558) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.notifications.cachelistener.CacheNotifierImpl$BaseCacheEntryListenerInvocation.invoke(CacheNotifierImpl.java:1537) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntryRemoved(CacheNotifierImpl.java:412) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.commands.write.RemoveCommand.notify(RemoveCommand.java:107) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.notifications.cachelistener.NotifyHelper.entryCommitted(NotifyHelper.java:25) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.locking.ClusteringDependentLogic$ReplicationLogic.commitSingleEntry(ClusteringDependentLogic.java:427) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.locking.ClusteringDependentLogic$AbstractClusteringDependentLogic.commitEntry(ClusteringDependentLogic.java:176) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.impl.EntryWrappingInterceptor.commitContextEntry(EntryWrappingInterceptor.java:571) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.impl.EntryWrappingInterceptor.commitEntryIfNeeded(EntryWrappingInterceptor.java:794) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.impl.EntryWrappingInterceptor.commitContextEntries(EntryWrappingInterceptor.java:548) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.impl.EntryWrappingInterceptor.applyChanges(EntryWrappingInterceptor.java:604) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.impl.EntryWrappingInterceptor.lambda$setSkipRemoteGetsAndInvokeNextForDataCommand$7(EntryWrappingInterceptor.java:660) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextThenAccept(BaseAsyncInterceptor.java:105) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.impl.EntryWrappingInterceptor.setSkipRemoteGetsAndInvokeNextForDataCommand(EntryWrappingInterceptor.java:657) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.impl.EntryWrappingInterceptor.visitRemoveCommand(EntryWrappingInterceptor.java:353) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndFinally(BaseAsyncInterceptor.java:150) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.locking.AbstractLockingInterceptor.lambda$nonTxLockAndInvokeNext$1(AbstractLockingInterceptor.java:285) ~[infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.SyncInvocationStage.addCallback(SyncInvocationStage.java:42) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.InvocationStage.andHandle(InvocationStage.java:44) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.locking.AbstractLockingInterceptor.nonTxLockAndInvokeNext(AbstractLockingInterceptor.java:280) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitNonTxDataWriteCommand(AbstractLockingInterceptor.java:127) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitDataWriteCommand(NonTransactionalLockingInterceptor.java:40) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitRemoveCommand(AbstractLockingInterceptor.java:102) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:54) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.DDAsyncInterceptor.handleDefault(DDAsyncInterceptor.java:54) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.partitionhandling.impl.PartitionHandlingInterceptor.handleSingleWrite(PartitionHandlingInterceptor.java:91) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.partitionhandling.impl.PartitionHandlingInterceptor.visitRemoveCommand(PartitionHandlingInterceptor.java:64) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndHandle(BaseAsyncInterceptor.java:183) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.statetransfer.StateTransferInterceptor.handleNonTxWriteCommand(StateTransferInterceptor.java:309) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.statetransfer.StateTransferInterceptor.handleWriteCommand(StateTransferInterceptor.java:252) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.statetransfer.StateTransferInterceptor.visitRemoveCommand(StateTransferInterceptor.java:108) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:54) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitRemoveCommand(CacheMgmtInterceptor.java:420) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndExceptionally(BaseAsyncInterceptor.java:123) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:90) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:56) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.DDAsyncInterceptor.handleDefault(DDAsyncInterceptor.java:54) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.DDAsyncInterceptor.visitRemoveCommand(DDAsyncInterceptor.java:65) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:63) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.DDAsyncInterceptor.visitCommand(DDAsyncInterceptor.java:50) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invokeAsync(AsyncInterceptorChainImpl.java:234) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeededAsync(CacheImpl.java:1741) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.cache.impl.CacheImpl.removeAsync(CacheImpl.java:1587) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.cache.impl.DecoratedCache.removeAsync(DecoratedCache.java:426) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.cache.impl.AbstractDelegatingCache.removeAsync(AbstractDelegatingCache.java:229) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.cache.impl.EncoderCache.removeAsync(EncoderCache.java:336) [infinispan-core-9.2.1.Final.jar:9.2.1.Final]
at org.infinispan.lock.impl.manager.EmbeddedClusteredLockManager.remove(EmbeddedClusteredLockManager.java:144) [infinispan-clustered-lock-9.2.1.Final.jar:9.2.1.Final]
at com.bynubian.cache.implementation.infinispan.base.NonReentrantLock.destroy(NonReentrantLock.java:33) [classes/:?]
at com.bynubian.elasticsearch.management.IndexSetManagement.exit(IndexSetManagement.java:365) [bynubian-elasticsearch-core-4.2.0-SNAPSHOT.jar:4.2.0-SNAPSHOT-${buildNumber}]
at com.bynubian.elasticsearch.test.TestSyncElasticSearch.shutdown(TestSyncElasticSearch.java:52) [bynubian-elasticsearch-core-4.2.0-SNAPSHOT.jar:4.2.0-SNAPSHOT-${buildNumber}]
at com.bynubian.test.cache.infinispan.SyncElasticSearchHandler.exit(SyncElasticSearchHandler.java:34) [test-classes/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108) [testng-6.11.jar:?]
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523) [testng-6.11.jar:?]
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224) [testng-6.11.jar:?]
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146) [testng-6.11.jar:?]
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:350) [testng-6.11.jar:?]
at org.testng.SuiteRunner.run(SuiteRunner.java:289) [testng-6.11.jar:?]
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) [testng-6.11.jar:?]
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) [testng-6.11.jar:?]
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301) [testng-6.11.jar:?]
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226) [testng-6.11.jar:?]
at org.testng.TestNG.runSuites(TestNG.java:1144) [testng-6.11.jar:?]
at org.testng.TestNG.run(TestNG.java:1115) [testng-6.11.jar:?]
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:283) [surefire-testng-2.20.jar:2.20]
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75) [surefire-testng-2.20.jar:2.20]
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:120) [surefire-testng-2.20.jar:2.20]
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:386) [surefire-booter-2.20.jar:2.20]
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:323) [surefire-booter-2.20.jar:2.20]
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:143) [surefire-booter-2.20.jar:2.20]
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 12 months
[JBoss JIRA] (ISPN-7806) QueryInterceptor should not load entries from DC but context
by Gustavo Fernandes (JIRA)
[ https://issues.jboss.org/browse/ISPN-7806?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes updated ISPN-7806:
------------------------------------
Fix Version/s: 9.2.0.Beta2
> QueryInterceptor should not load entries from DC but context
> ------------------------------------------------------------
>
> Key: ISPN-7806
> URL: https://issues.jboss.org/browse/ISPN-7806
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 9.0.0.Final
> Reporter: Radim Vansa
> Assignee: Gustavo Fernandes
> Fix For: 9.2.0.Beta2
>
>
> Currently in {{visitPrepareCommand}} the query interceptor is loading data directly from data container. That's wrong - if the entry is passivated/evicted, the previous value is incorrect.
> As the data is not loaded (from DC/persistence) at current QI position, we should move QueryInterceptor after EntryWrappingInterceptor, CacheLoaderInterceptor -and xDistributionInterceptor (which may load the data from remote node),- and load the previous entry from context instead. The same approach should be taken for non-tx command, rather than relying on their return value.
> **EDIT**: we should not move it below xDistributionInterceptor because on backup owner (which may be write-owner but not a read-owner) we would retrieve the updated value (affected by the current command), not the previous one.
> There will still be issues if the command has SKIP_CACHE_LOAD flag: I suggest warning message if it doesn't have SKIP_INDEXING flag as well.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 12 months
[JBoss JIRA] (ISPN-9069) RestStore should not depend on Rest server
by Tristan Tarrant (JIRA)
Tristan Tarrant created ISPN-9069:
-------------------------------------
Summary: RestStore should not depend on Rest server
Key: ISPN-9069
URL: https://issues.jboss.org/browse/ISPN-9069
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Reporter: Tristan Tarrant
Assignee: Tristan Tarrant
The REST store has an optional dependency on the REST server just to build an unused class. Removing the class and changing the scope to test allows us to trim ~14MB of artifacts from the "-all" distribution
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 12 months
[JBoss JIRA] (ISPN-9068) Indexer throw exception in cluster mode
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-9068?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-9068:
--------------------------------
Status: Open (was: New)
> Indexer throw exception in cluster mode
> ---------------------------------------
>
> Key: ISPN-9068
> URL: https://issues.jboss.org/browse/ISPN-9068
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 9.2.1.Final
> Reporter: Sergey Chernolyas
> Priority: Critical
> Attachments: re_clustered_rocksdb.xml, re_entities.proto
>
>
> I have a cluster that contains two hosts.
> Also one cache have a indexing.
> Then I try add entity (see entity News in attached proto) to the cache, I take exception:
> __________
> 2018-04-11 21:17:54,695 ERROR [org.infinispan.interceptors.impl.InvocationContextInterceptor] (jgroups-17,server2) ISPN000136: Error executing command PutKeyValueCommand, writing keys [WrappedByteArray{bytes=[B0x4A24303030303030..[38], hashCode=61362266}]: org.hibernate.search.exception.SearchException: Unable to perform work. Entity Class is not @Indexed nor hosts @ContainedIn: org.infinispan.query.backend.QueryInterceptor$1
> at org.hibernate.search.backend.impl.PerTransactionWorker.performWork(PerTransactionWorker.java:63)
> at org.infinispan.query.backend.QueryInterceptor.performSearchWorks(QueryInterceptor.java:383)
> at org.infinispan.query.backend.QueryInterceptor.removeFromIndexes(QueryInterceptor.java:337)
> at org.infinispan.query.backend.QueryInterceptor.processChange(QueryInterceptor.java:448)
> at org.infinispan.query.backend.QueryInterceptor.lambda$handleDataWriteCommand$0(QueryInterceptor.java:184)
> at org.infinispan.interceptors.InvocationSuccessAction.apply(InvocationSuccessAction.java:19)
> at org.infinispan.interceptors.impl.QueueAsyncInvocationStage.invokeQueuedHandlers(QueueAsyncInvocationStage.java:118)
> at org.infinispan.interceptors.impl.QueueAsyncInvocationStage.accept(QueueAsyncInvocationStage.java:81)
> at org.infinispan.interceptors.impl.QueueAsyncInvocationStage.accept(QueueAsyncInvocationStage.java:30)
> at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
> at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
> at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
> at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
> at org.infinispan.remoting.transport.AbstractRequest.complete(AbstractRequest.java:66)
> at org.infinispan.remoting.transport.impl.MultiTargetRequest.onResponse(MultiTargetRequest.java:102)
> at org.infinispan.remoting.transport.impl.RequestRepository.addResponse(RequestRepository.java:53)
> at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processResponse(JGroupsTransport.java:1304)
> at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processMessage(JGroupsTransport.java:1207)
> at org.infinispan.remoting.transport.jgroups.JGroupsTransport.access$200(JGroupsTransport.java:123)
> at org.infinispan.remoting.transport.jgroups.JGroupsTransport$ChannelCallbacks.receive(JGroupsTransport.java:1342)
> at org.jgroups.JChannel.up(JChannel.java:819)
> at org.jgroups.fork.ForkProtocolStack.up(ForkProtocolStack.java:134)
> at org.jgroups.stack.Protocol.up(Protocol.java:340)
> at org.jgroups.protocols.FORK.up(FORK.java:134)
> at org.jgroups.protocols.FRAG3.up(FRAG3.java:171)
> at org.jgroups.protocols.FlowControl.up(FlowControl.java:343)
> at org.jgroups.protocols.FlowControl.up(FlowControl.java:343)
> at org.jgroups.protocols.pbcast.GMS.up(GMS.java:864)
> at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:240)
> at org.jgroups.protocols.UNICAST3.deliverMessage(UNICAST3.java:1002)
> at org.jgroups.protocols.UNICAST3.handleDataReceived(UNICAST3.java:728)
> at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:383)
> at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:600)
> at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:119)
> at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:199)
> at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:252)
> at org.jgroups.protocols.MERGE3.up(MERGE3.java:276)
> at org.jgroups.protocols.Discovery.up(Discovery.java:267)
> at org.jgroups.protocols.TP.passMessageUp(TP.java:1248)
> at org.jgroups.util.SubmitToThreadPool$SingleMessageHandler.run(SubmitToThreadPool.java:87)
> 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)
> _____
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 12 months
[JBoss JIRA] (ISPN-9068) Indexer throw exception in cluster mode
by Sergey Chernolyas (JIRA)
[ https://issues.jboss.org/browse/ISPN-9068?page=com.atlassian.jira.plugin.... ]
Sergey Chernolyas commented on ISPN-9068:
-----------------------------------------
{code:java}
package ru.beeline.re.infinispan.marshaller;
import ru.beeline.re.entities.News;
import java.io.IOException;
/**
* @author Sergey_Chernolyas
*/
public class NewsMarshaller extends AbstractBaseMarshaller<News> {
@Override
public Class<? extends News> getJavaClass() {
return News.class;
}
@Override
public News readFrom(ProtoStreamReader reader) throws IOException {
News news = new News();
news.setTimestamp(reader.readLong("timestamp"));
news.setType(reader.readString("type"));
news.setChannelId(reader.readString("channelId"));
news.setId(reader.readString("id"));
return news;
}
@Override
public void writeTo(ProtoStreamWriter writer, News news) throws IOException {
writer.writeLong("timestamp", news.getTimestamp());
writer.writeString("type", news.getType());
writer.writeString("channelId", news.getChannelId());
writer.writeString("id", news.getId());
}
}
{code}
{code:java}
package ru.beeline.re.entities;
import org.infinispan.protostream.annotations.ProtoDoc;
import org.infinispan.protostream.annotations.ProtoField;
import java.io.Serializable;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiPredicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@ProtoDoc("@Indexed")
public class News implements Serializable {
private static final long serialVersionUID = -7389340513007964365L;
private String id;
private long timestamp;
private String type;
private String channelId;
public News() {
}
public News(String id, long time, String channelId, String type) {
this.id = id;
this.timestamp = time;
this.channelId = channelId;
this.type = type;
}
public String getId() {
return id;
}
@ProtoField(number = 4, required = true)
public void setId(String id) {
this.id = id;
}
@ProtoDoc("@Field(index=Index.YES, analyze = Analyze.NO, store = Store.NO)")
@ProtoDoc("@NumericField")
@ProtoDoc("@SortableField")
@ProtoField(number = 1, required = true)
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(long time) {
this.timestamp = time;
}
@ProtoField(number = 3, required = true)
@ProtoDoc("@Field(index=Index.YES, analyze = Analyze.NO, store = Store.NO)")
public String getChannelId() {
return channelId;
}
public void setChannelId(String channelId) {
this.channelId = channelId;
}
@ProtoDoc("@Field(index=Index.YES, analyze = Analyze.NO, store = Store.NO)")
@ProtoField(number = 2, required = true)
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
News news = (News) o;
return timestamp == news.timestamp &&
Objects.equals(id, news.id) &&
Objects.equals(type, news.type) &&
Objects.equals(channelId, news.channelId);
}
@Override
public int hashCode() {
return Objects.hash(id, timestamp, type, channelId);
}
public enum Type {
NEWS((type, alias) ->
"feedItem".equalsIgnoreCase(type)
&& !"flocktory".equalsIgnoreCase(alias)
&& !"Beeline".equalsIgnoreCase(alias)),
OFFER((type, alias) ->
"Action".equalsIgnoreCase(type)
|| "flocktory".equalsIgnoreCase(alias)
|| "Beeline".equalsIgnoreCase(alias));
Type(BiPredicate<String, String> test) {
this.test = test;
}
private final BiPredicate<String, String> test;
public static Optional<String> getType(String type, String alias) {
List<String> types = Stream.of(values())
.filter(t -> t.test.test(type, alias))
.map(Enum::name)
.collect(Collectors.toList());
if (types.size() > 1) {
throw new IllegalStateException("For type " + type + " and alias " + alias + " was found more than one types");
} else if (types.size() == 1) {
return Optional.of(types.get(0));
} else {
return Optional.empty();
}
}
}
}
{code}
client code:
{code:java}
package ru.beeline.re.infinispan;
import org.infinispan.client.hotrod.RemoteCache;
import org.infinispan.client.hotrod.RemoteCacheManager;
import org.infinispan.client.hotrod.configuration.ClientIntelligence;
import org.infinispan.client.hotrod.configuration.ConfigurationBuilder;
import org.infinispan.client.hotrod.configuration.NearCacheMode;
import org.infinispan.client.hotrod.impl.transport.tcp.RoundRobinBalancingStrategy;
import org.infinispan.client.hotrod.marshall.ProtoStreamMarshaller;
import org.infinispan.protostream.FileDescriptorSource;
import org.infinispan.protostream.SerializationContext;
import ru.beeline.re.entities.News;
import ru.beeline.re.utils.CacheName;
import java.io.IOException;
import java.util.UUID;
/**
* @author Sergey Chernolyas &sergey_chernolyas(a)gmail.com&
*/
public class NewsIndexTest {
public static void main(String[] argv) throws IOException {
RemoteCacheManager remoteCacheManager = infinispan();
News news = new News();
news.setId(UUID.randomUUID().toString());
news.setChannelId(UUID.randomUUID().toString());
news.setType(News.Type.NEWS.name());
news.setTimestamp(0);
RemoteCache<String, News> newsCache = remoteCacheManager.getCache(CacheName.NEWS.name());
System.out.println("stat : "+newsCache.stats().getStatsMap());
newsCache.put("testnews",news);
System.out.println("stat : "+newsCache.stats().getStatsMap());
}
private static RemoteCacheManager infinispan() {
try {
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.marshaller(new ProtoStreamMarshaller());
//builder.addServers("172.21.206.13:11322;172.21.206.202:11322");
builder.addServers("172.21.206.13:11322");
builder.balancingStrategy(new RoundRobinBalancingStrategy())
.clientIntelligence(ClientIntelligence.HASH_DISTRIBUTION_AWARE);
builder.nearCache().mode(NearCacheMode.INVALIDATED).maxEntries(1_000);
RemoteCacheManager remoteCacheManager = new RemoteCacheManager(builder.build(true));
SerializationContext serCtx = ProtoStreamMarshaller.getSerializationContext(remoteCacheManager);
FileDescriptorSource fds = new FileDescriptorSource();
fds.addProtoFiles("/infinispan/re_model.proto", "/infinispan/re_entities.proto", "/infinispan/re_shop_entities.proto");
serCtx.registerProtoFiles(fds);
serCtx.registerMarshallerProvider(new MarshallerProvider());
for (Class pojoClass : MarshallerProvider.getClassMessageMarshallerMap().keySet()) {
System.out.println(" can marshall " + pojoClass + " ? :" + serCtx.canMarshall(pojoClass));
}
// Connect to the server
return remoteCacheManager;
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
{code}
> Indexer throw exception in cluster mode
> ---------------------------------------
>
> Key: ISPN-9068
> URL: https://issues.jboss.org/browse/ISPN-9068
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 9.2.1.Final
> Reporter: Sergey Chernolyas
> Priority: Critical
> Attachments: re_clustered_rocksdb.xml, re_entities.proto
>
>
> I have a cluster that contains two hosts.
> Also one cache have a indexing.
> Then I try add entity (see entity News in attached proto) to the cache, I take exception:
> __________
> 2018-04-11 21:17:54,695 ERROR [org.infinispan.interceptors.impl.InvocationContextInterceptor] (jgroups-17,server2) ISPN000136: Error executing command PutKeyValueCommand, writing keys [WrappedByteArray{bytes=[B0x4A24303030303030..[38], hashCode=61362266}]: org.hibernate.search.exception.SearchException: Unable to perform work. Entity Class is not @Indexed nor hosts @ContainedIn: org.infinispan.query.backend.QueryInterceptor$1
> at org.hibernate.search.backend.impl.PerTransactionWorker.performWork(PerTransactionWorker.java:63)
> at org.infinispan.query.backend.QueryInterceptor.performSearchWorks(QueryInterceptor.java:383)
> at org.infinispan.query.backend.QueryInterceptor.removeFromIndexes(QueryInterceptor.java:337)
> at org.infinispan.query.backend.QueryInterceptor.processChange(QueryInterceptor.java:448)
> at org.infinispan.query.backend.QueryInterceptor.lambda$handleDataWriteCommand$0(QueryInterceptor.java:184)
> at org.infinispan.interceptors.InvocationSuccessAction.apply(InvocationSuccessAction.java:19)
> at org.infinispan.interceptors.impl.QueueAsyncInvocationStage.invokeQueuedHandlers(QueueAsyncInvocationStage.java:118)
> at org.infinispan.interceptors.impl.QueueAsyncInvocationStage.accept(QueueAsyncInvocationStage.java:81)
> at org.infinispan.interceptors.impl.QueueAsyncInvocationStage.accept(QueueAsyncInvocationStage.java:30)
> at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
> at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
> at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
> at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
> at org.infinispan.remoting.transport.AbstractRequest.complete(AbstractRequest.java:66)
> at org.infinispan.remoting.transport.impl.MultiTargetRequest.onResponse(MultiTargetRequest.java:102)
> at org.infinispan.remoting.transport.impl.RequestRepository.addResponse(RequestRepository.java:53)
> at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processResponse(JGroupsTransport.java:1304)
> at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processMessage(JGroupsTransport.java:1207)
> at org.infinispan.remoting.transport.jgroups.JGroupsTransport.access$200(JGroupsTransport.java:123)
> at org.infinispan.remoting.transport.jgroups.JGroupsTransport$ChannelCallbacks.receive(JGroupsTransport.java:1342)
> at org.jgroups.JChannel.up(JChannel.java:819)
> at org.jgroups.fork.ForkProtocolStack.up(ForkProtocolStack.java:134)
> at org.jgroups.stack.Protocol.up(Protocol.java:340)
> at org.jgroups.protocols.FORK.up(FORK.java:134)
> at org.jgroups.protocols.FRAG3.up(FRAG3.java:171)
> at org.jgroups.protocols.FlowControl.up(FlowControl.java:343)
> at org.jgroups.protocols.FlowControl.up(FlowControl.java:343)
> at org.jgroups.protocols.pbcast.GMS.up(GMS.java:864)
> at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:240)
> at org.jgroups.protocols.UNICAST3.deliverMessage(UNICAST3.java:1002)
> at org.jgroups.protocols.UNICAST3.handleDataReceived(UNICAST3.java:728)
> at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:383)
> at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:600)
> at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:119)
> at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:199)
> at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:252)
> at org.jgroups.protocols.MERGE3.up(MERGE3.java:276)
> at org.jgroups.protocols.Discovery.up(Discovery.java:267)
> at org.jgroups.protocols.TP.passMessageUp(TP.java:1248)
> at org.jgroups.util.SubmitToThreadPool$SingleMessageHandler.run(SubmitToThreadPool.java:87)
> 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)
> _____
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 12 months