[JBoss JIRA] (ISPN-5599) Deadlock exception when purging string based JDBC Store
by Richard Lucas (JIRA)
[ https://issues.jboss.org/browse/ISPN-5599?page=com.atlassian.jira.plugin.... ]
Richard Lucas commented on ISPN-5599:
-------------------------------------
It appears this issue is a side effect of me wrapping the JDBC calls in a local transaction via a patched version of Infinispan. The issue occurs when the expiration process runs and attempts to remove expired items in the cache store. This results in row locking which results in deadlock exceptions if my application tries to access the row while it is locked. I have also seen the issue cause the purge to error if the application has the row locked.
I have resolved the issue for now by disabling expiration in my cache store as I do not require it.
This issue can most likely be closed as it is a result of my modified code base but it may be worth noting that this could be an issue when transaction support is introduced for JDBC Cache Stores ISPN-201
> Deadlock exception when purging string based JDBC Store
> -------------------------------------------------------
>
> Key: ISPN-5599
> URL: https://issues.jboss.org/browse/ISPN-5599
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 7.2.0.Final
> Environment: Wildfly 8.2
> Reporter: Richard Lucas
> Labels: cache-store, jdbc
>
> I'm seeing the following expectation periodically when purging my Infinispan cache using the JDBC string based cache store:
> {noformat}
> 12:45:20,752 WARN [org.infinispan.persistence.manager.PersistenceManagerImpl] (expiration-thread--p2-t1) ISPN000026: Caught exception purging data container!: org.infinispan.persistence.spi.PersistenceException: java.util.concurrent.ExecutionException: org.infinispan.persistence.spi.PersistenceException: Failed clearing string based JDBC store
> at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.purge(JdbcStringBasedStore.java:302) [infinispan-cachestore-jdbc.jar:7.2.0.Final]
> at org.infinispan.persistence.manager.PersistenceManagerImpl.purgeExpired(PersistenceManagerImpl.java:342) [infinispan-core.jar:7.2.0.Final]
> at org.infinispan.expiration.impl.ExpirationManagerImpl.processExpiration(ExpirationManagerImpl.java:101) [infinispan-core.jar:7.2.0.Final]
> at org.infinispan.expiration.impl.ExpirationManagerImpl$ScheduledTask.run(ExpirationManagerImpl.java:122) [infinispan-core.jar:7.2.0.Final]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_40]
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [rt.jar:1.8.0_40]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [rt.jar:1.8.0_40]
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [rt.jar:1.8.0_40]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]
> Caused by: java.util.concurrent.ExecutionException: org.infinispan.persistence.spi.PersistenceException: Failed clearing string based JDBC store
> at java.util.concurrent.FutureTask.report(FutureTask.java:122) [rt.jar:1.8.0_40]
> at java.util.concurrent.FutureTask.get(FutureTask.java:192) [rt.jar:1.8.0_40]
> at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.purge(JdbcStringBasedStore.java:297) [infinispan-cachestore-jdbc.jar:7.2.0.Final]
> ... 10 more
> Caused by: org.infinispan.persistence.spi.PersistenceException: Failed clearing string based JDBC store
> at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore$1.call(JdbcStringBasedStore.java:288) [infinispan-cachestore-jdbc.jar:7.2.0.Final]
> at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore$1.call(JdbcStringBasedStore.java:272) [infinispan-cachestore-jdbc.jar:7.2.0.Final]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_40]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_40]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_40]
> ... 3 more
> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_40]
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [rt.jar:1.8.0_40]
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_40]
> at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [rt.jar:1.8.0_40]
> at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
> at com.mysql.jdbc.Util.getInstance(Util.java:383)
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4208)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4140)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2597)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2758)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2826)
> at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)
> at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2334)
> at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2262)
> at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2246)
> at com.mysql.jdbc.jdbc2.optional.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:873)
> at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.executeUpdate(CachedPreparedStatement.java:119)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493)
> at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore$1.call(JdbcStringBasedStore.java:282) [infinispan-cachestore-jdbc.jar:7.2.0.Final]
> ... 7 more
> {noformat}
> My cache configuration is:
> {code:xml}
> <cache-container default-cache="repo" statistics="false">
> <transport cluster="modeshape-cluster" stack="tcp"/>
> <jmx duplicate-domains="true"/>
> <replicated-cache name="repo" mode="SYNC">
> <locking striping="false" isolation="READ_COMMITTED"/>
> <transaction mode="NON_DURABLE_XA" locking="PESSIMISTIC"/>
> <persistence passivation="false">
> <string-keyed-jdbc-store xmlns="urn:infinispan:config:store:jdbc:7.0" fetch-state="false" read-only="false" purge="true" shared="true">
> <data-source jndi-url="java:jboss/datasources/ds"/>
> <string-keyed-table prefix="modeshape" create-on-start="true" drop-on-exit="false">
> <id-column name="id" type="VARCHAR(200)"/>
> <data-column name="datum" type="LONGBLOB"/>
> <timestamp-column name="version" type="BIGINT"/>
> </string-keyed-table>
> </string-keyed-jdbc-store>
> </persistence>
> </replicated-cache>
> </cache-container>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months
[JBoss JIRA] (ISPN-5619) Deprecate EntryRetriever with distributed streams
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-5619?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-5619:
--------------------------------
Summary: Deprecate EntryRetriever with distributed streams (was: Deprecate EntryRetriever with distribtued streams)
> Deprecate EntryRetriever with distributed streams
> -------------------------------------------------
>
> Key: ISPN-5619
> URL: https://issues.jboss.org/browse/ISPN-5619
> Project: Infinispan
> Issue Type: Enhancement
> Components: Core
> Affects Versions: 8.0.0.Beta1
> Reporter: William Burns
> Assignee: William Burns
> Fix For: 8.0.0.CR1, 8.0.0.Final
>
>
> Distributed streams were added for ISPN-5293. However segment completion listeners are not yet added and thus EntryRetriever is still required for that case. This is to add support for listener completion so we can remove EntryRetriever references.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months
[JBoss JIRA] (ISPN-5619) Deprecate EntryRetriever with distribtued streams
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-5619?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-5619:
--------------------------------
Summary: Deprecate EntryRetriever with distribtued streams (was: Implement segment listeners for distributed streams)
> Deprecate EntryRetriever with distribtued streams
> -------------------------------------------------
>
> Key: ISPN-5619
> URL: https://issues.jboss.org/browse/ISPN-5619
> Project: Infinispan
> Issue Type: Enhancement
> Components: Core
> Affects Versions: 8.0.0.Beta1
> Reporter: William Burns
> Assignee: William Burns
> Fix For: 8.0.0.CR1, 8.0.0.Final
>
>
> Distributed streams were added for ISPN-5293. However segment completion listeners are not yet added and thus EntryRetriever is still required for that case. This is to add support for listener completion so we can remove EntryRetriever references.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months