[JBoss JIRA] (ISPN-3938) AdvancedAsyncCacheLoader.process() concurrency issues
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-3938?page=com.atlassian.jira.plugin.... ]
Dan Berindei commented on ISPN-3938:
------------------------------------
Will, I think you're right, normally there shouldn't be any other thread modifying the {{HashSet}} at the time of the iteration, so this is probably a problem in the underlying loader implementation and/or in {{ExecutorAllCompletionService}}. I'm not sure if we can do anything in {{AdvancedAsyncCacheLoader}} to guard against it...
However, the usage of {{advancedLoader().process()}} in {{loadAllKeys()}} still doesn't look thread-safe, so I'd replace the {{allKeys}} set with a {{ConcurrentMap}}.
> AdvancedAsyncCacheLoader.process() concurrency issues
> -----------------------------------------------------
>
> Key: ISPN-3938
> URL: https://issues.jboss.org/browse/ISPN-3938
> Project: Infinispan
> Issue Type: Bug
> Components: Core, Loaders and Stores
> Affects Versions: 6.0.0.Final
> Reporter: Dan Berindei
> Assignee: William Burns
> Fix For: 7.1.0.Final
>
>
> {{AdvancedAsyncCacheLoader.process()}} calls {{advancedLoader().process()}} to collect all the keys in the store, but the HashSet used to collect the keys it not thread-safe. This can cause problems, e.g. during state transfer:
> {noformat}
> WARN cheTopologyControlCommand | ISPN000071: Caught exception when handling command CacheTopologyControlCommand{cache=sessions, type=CH_UPDATE, sender=alfie-lt-46127, joinInfo=null, topologyId=3, currentCH=DefaultConsistentHash{numSegments=60, numOwners=1, members=[alfie-lt-46127]}, pendingCH=null, throwable=null, viewId=1}java.util.ConcurrentModificationException
> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:926)
> at java.util.HashMap$KeyIterator.next(HashMap.java:960)
> at org.infinispan.persistence.async.AdvancedAsyncCacheLoader.process(AdvancedAsyncCacheLoader.java:80)
> at org.infinispan.persistence.manager.PersistenceManagerImpl.processOnAllStores(PersistenceManagerImpl.java:414)
> at org.infinispan.statetransfer.StateConsumerImpl.invalidateSegments(StateConsumerImpl.java:910)
> at org.infinispan.statetransfer.StateConsumerImpl.onTopologyUpdate(StateConsumerImpl.java:393)
> at org.infinispan.statetransfer.StateTransferManagerImpl.doTopologyUpdate(StateTransferManagerImpl.java:178)
> at org.infinispan.statetransfer.StateTransferManagerImpl.access$000(StateTransferManagerImpl.java:38)
> at org.infinispan.statetransfer.StateTransferManagerImpl$1.updateConsistentHash(StateTransferManagerImpl.java:100)
> at org.infinispan.topology.LocalTopologyManagerImpl.handleConsistentHashUpdate(LocalTopologyManagerImpl.java:191)
> at org.infinispan.topology.CacheTopologyControlCommand.doPerform(CacheTopologyControlCommand.java:152)
> at org.infinispan.topology.CacheTopologyControlCommand.perform(CacheTopologyControlCommand.java:124)
> at org.infinispan.topology.ClusterTopologyManagerImpl$3.run(ClusterTopologyManagerImpl.java:606)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:744)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 2 months
[JBoss JIRA] (ISPN-5149) Nested field is reported as non-indexed
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-5149?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-5149:
----------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Nested field is reported as non-indexed
> ---------------------------------------
>
> Key: ISPN-5149
> URL: https://issues.jboss.org/browse/ISPN-5149
> Project: Infinispan
> Issue Type: Bug
> Components: Remote Querying
> Affects Versions: 7.1.0.Beta1
> Reporter: Adrian Nistor
> Assignee: Adrian Nistor
> Fix For: 7.1.0.Final
>
>
> Steps to reproduce:
> 1. use the remote-query quickstart app (https://github.com/jboss-developer/jboss-jdg-quickstarts/tree/master/remo...) with an indexed cache config to add a Person and then a Memo object that has the Person as author.
> 2. try to query memos by author -> you get this exception
> {code}
> Jan 14, 2015 4:13:52 PM org.infinispan.client.hotrod.impl.protocol.Codec20 checkForErrorsInResponseStatus
> WARN: ISPN004005: Error received from the server: java.lang.IllegalArgumentException: Field author.name from type quickstart.Memo is not indexed
> org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for message id[14] returned server error (status=0x85): java.lang.IllegalArgumentException: Field author.name from type quickstart.Memo is not indexed
> at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:321)
> at org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:111)
> at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:97)
> at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:56)
> at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:57)
> at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:24)
> at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:50)
> at org.infinispan.client.hotrod.impl.query.RemoteQuery.executeQuery(RemoteQuery.java:72)
> at org.infinispan.client.hotrod.impl.query.RemoteQuery.list(RemoteQuery.java:62)
> at org.jboss.as.quickstarts.datagrid.hotrod.query.AddressBookManager.queryMemoByAuthor(AddressBookManager.java:285)
> at org.jboss.as.quickstarts.datagrid.hotrod.query.AddressBookManager.main(AddressBookManager.java:328)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
> >
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 2 months
[JBoss JIRA] (ISPN-5129) Add a clustered transactional cache example for Infinispan Server
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-5129?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-5129:
-----------------------------------
Status: Open (was: New)
> Add a clustered transactional cache example for Infinispan Server
> -----------------------------------------------------------------
>
> Key: ISPN-5129
> URL: https://issues.jboss.org/browse/ISPN-5129
> Project: Infinispan
> Issue Type: Task
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Fix For: 7.1.0.Final
>
>
> We should add a transactional cache example as a separate configuration in docs/examples folder.
> There's no such example at the moment, and this is really needed in order to avoid WARN messages when conditional versioned operations are used, e.g.
> {code}
> 08:38:08,920 WARN [org.infinispan.server.hotrod.Decoder2x$] (HotRodServerWorker-6-8) ISPN006010:
> Conditional operation 'ReplaceIfUnmodifiedRequest' should be used with transactional caches, otherwise data inconsistency issues could arise under failure situations
> {code}
> Also, this WARN message should only appear when the cache is clustered and there's > 1 node in the cluster, but currently it also appears in local caches, but this is a different issue...
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 2 months
[JBoss JIRA] (ISPN-5129) Add a clustered transactional cache example for Infinispan Server
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-5129?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-5129:
-----------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/3233
> Add a clustered transactional cache example for Infinispan Server
> -----------------------------------------------------------------
>
> Key: ISPN-5129
> URL: https://issues.jboss.org/browse/ISPN-5129
> Project: Infinispan
> Issue Type: Task
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Fix For: 7.1.0.Final
>
>
> We should add a transactional cache example as a separate configuration in docs/examples folder.
> There's no such example at the moment, and this is really needed in order to avoid WARN messages when conditional versioned operations are used, e.g.
> {code}
> 08:38:08,920 WARN [org.infinispan.server.hotrod.Decoder2x$] (HotRodServerWorker-6-8) ISPN006010:
> Conditional operation 'ReplaceIfUnmodifiedRequest' should be used with transactional caches, otherwise data inconsistency issues could arise under failure situations
> {code}
> Also, this WARN message should only appear when the cache is clustered and there's > 1 node in the cluster, but currently it also appears in local caches, but this is a different issue...
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 2 months
[JBoss JIRA] (ISPN-4721) RestStoreParallelIterationTest.testParallelIterationWithoutValueOrMetadata randomly failing
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-4721?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño resolved ISPN-4721.
------------------------------------
Fix Version/s: (was: 7.1.0.Final)
Resolution: Duplicate Issue
> RestStoreParallelIterationTest.testParallelIterationWithoutValueOrMetadata randomly failing
> -------------------------------------------------------------------------------------------
>
> Key: ISPN-4721
> URL: https://issues.jboss.org/browse/ISPN-4721
> Project: Infinispan
> Issue Type: Bug
> Components: Remote Protocols
> Affects Versions: 7.0.0.Beta1
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Labels: testsuite_stability
> Attachments: Infinispan_Pull_requests_monitor_5797_2833_pruivo_ISPN-4680.log.zip
>
>
> Fails with:
> {code}
> org.infinispan.persistence.spi.PersistenceException: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:18080 refused
> at org.infinispan.persistence.rest.RestStore.write(RestStore.java:183)
> at org.infinispan.persistence.ParallelIterationTest.insertData(ParallelIterationTest.java:199)
> at org.infinispan.persistence.ParallelIterationTest.runIterationTest(ParallelIterationTest.java:125)
> at org.infinispan.persistence.ParallelIterationTest.testParallelIterationWithoutValueOrMetadata(ParallelIterationTest.java:84)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
> at org.testng.TestRunner.privateRun(TestRunner.java:767)
> at org.testng.TestRunner.run(TestRunner.java:617)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
> at org.testng.SuiteRunner.access$000(SuiteRunner.java:38)
> at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:382)
> at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:18080 refused
> at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
> at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
> at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:644)
> at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
> at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
> at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:827)
> at org.infinispan.persistence.rest.RestStore.write(RestStore.java:181)
> ... 23 more
> Caused by: java.net.ConnectException: Cannot assign requested address
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
> at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
> at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> at java.net.Socket.connect(Socket.java:579)
> at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127)
> at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
> ... 29 more
> ------- Stdout: -----
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 2 months