[JBoss JIRA] (ISPN-4126) Memory is pre-allocated when enable eviction, and it may cause OOM even if there is no entry stored in cache.
by tina tian (JIRA)
[ https://issues.jboss.org/browse/ISPN-4126?page=com.atlassian.jira.plugin.... ]
tina tian updated ISPN-4126:
----------------------------
Description:
I am considering to use Infinispan as a single cache in my project, and I met a memory problem when I enabled eviction. Memory is pre-allocated according to the maxEntries you set even if no entry is stored in that cache!
This is really a critical issue, since most time you are not sure how many entries you are going to store in the cache, you set a maxEntries to avoid OOME, but now, when you set maxEntries, memory will be pre-allocated no matter you are going to use it or not!
Ehcache used to have this kind of problem too, but they solved it DEV-9437.
Step to reproduce:
1) Enable eviction on config
2) Set maxEntries to a big number, like 100000
3) Create 100 caches using the default config
You will see OOM or big usage of memory.
was:
I am considering to use Infinispan as a single cache in my project, and I met a memory problem when I enabled eviction. Memory is pre-allocated even if no entry is stored in that cache!
This is really a critical issue, since most time you are not sure how many entries you are going to store in the cache, you set a maxEntries to avoid OOME, but now, when you set maxEntries, memory will be pre-allocated no matter you are going to use it or not!
Ehcache used to have this kind of problem too, but they solved it DEV-9437.
Step to reproduce:
1) Enable eviction on config
2) Set maxEntries to a big number, like 100000
3) Create 100 caches using the default config
You will see OOM or big usage of memory.
> Memory is pre-allocated when enable eviction, and it may cause OOM even if there is no entry stored in cache.
> -------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-4126
> URL: https://issues.jboss.org/browse/ISPN-4126
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Reporter: tina tian
> Assignee: Dan Berindei
> Priority: Critical
>
> I am considering to use Infinispan as a single cache in my project, and I met a memory problem when I enabled eviction. Memory is pre-allocated according to the maxEntries you set even if no entry is stored in that cache!
> This is really a critical issue, since most time you are not sure how many entries you are going to store in the cache, you set a maxEntries to avoid OOME, but now, when you set maxEntries, memory will be pre-allocated no matter you are going to use it or not!
> Ehcache used to have this kind of problem too, but they solved it DEV-9437.
> Step to reproduce:
> 1) Enable eviction on config
> 2) Set maxEntries to a big number, like 100000
> 3) Create 100 caches using the default config
> You will see OOM or big usage of memory.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ISPN-4126) Memory is pre-allocated when enable eviction, and it may cause OOM even if there is no entry stored in cache.
by tina tian (JIRA)
[ https://issues.jboss.org/browse/ISPN-4126?page=com.atlassian.jira.plugin.... ]
tina tian updated ISPN-4126:
----------------------------
Summary: Memory is pre-allocated when enable eviction, and it may cause OOM even if there is no entry stored in cache. (was: Memory is pre-allocated when enable eviction, and it may cause OOM even if there is no entries stored in cache.)
> Memory is pre-allocated when enable eviction, and it may cause OOM even if there is no entry stored in cache.
> -------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-4126
> URL: https://issues.jboss.org/browse/ISPN-4126
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Reporter: tina tian
> Assignee: Dan Berindei
> Priority: Critical
>
> I am considering to use Infinispan as a single cache in my project, and I met a memory problem when I enabled eviction. Memory is pre-allocated even if no entry is stored in that cache!
> This is really a critical issue, since most time you are not sure how many entries you are going to store in the cache, you set a maxEntries to avoid OOME, but now, when you set maxEntries, memory will be pre-allocated no matter you are going to use it or not!
> Ehcache used to have this kind of problem too, but they solved it DEV-9437.
> Step to reproduce:
> 1) Enable eviction on config
> 2) Set maxEntries to a big number, like 100000
> 3) Create 100 caches using the default config
> You will see OOM or big usage of memory.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ISPN-4126) Memory is pre-allocated when enable eviction, and it may cause OOM even if there is no entries stored in cache.
by tina tian (JIRA)
tina tian created ISPN-4126:
-------------------------------
Summary: Memory is pre-allocated when enable eviction, and it may cause OOM even if there is no entries stored in cache.
Key: ISPN-4126
URL: https://issues.jboss.org/browse/ISPN-4126
Project: Infinispan
Issue Type: Bug
Components: Core
Reporter: tina tian
Assignee: Dan Berindei
Priority: Critical
I am considering to use Infinispan as a single cache in my project, and I met a memory problem when I enabled eviction. Memory is pre-allocated even if no entry is stored in that cache!
This is really a critical issue, since most time you are not sure how many entries you are going to store in the cache, you set a maxEntries to avoid OOME, but now, when you set maxEntries, memory will be pre-allocated no matter you are going to use it or not!
Ehcache used to have this kind of problem too, but they solved it DEV-9437.
Step to reproduce:
1) Enable eviction on config
2) Set maxEntries to a big number, like 100000
3) Create 100 caches using the default config
You will see OOM or big usage of memory.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ISPN-4125) ClassCastException if cache.keyset() is invoked for a string-keyed-jdbc-store in C/S mode
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-4125?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-4125:
--------------------------------
Fix Version/s: 7.0.0.Final
7.0.0.Alpha2
Labels: 621 630 (was: )
Affects Version/s: 6.0.0.Final
Component/s: Remote Querying
> ClassCastException if cache.keyset() is invoked for a string-keyed-jdbc-store in C/S mode
> -----------------------------------------------------------------------------------------
>
> Key: ISPN-4125
> URL: https://issues.jboss.org/browse/ISPN-4125
> Project: Infinispan
> Issue Type: Bug
> Components: Remote Querying
> Affects Versions: 6.0.0.Final
> Reporter: Wolf-Dieter Fink
> Assignee: Adrian Nistor
> Labels: 621, 630
> Fix For: 7.0.0.Final, 7.0.0.Alpha2
>
>
> If the cache is empty cache.keyset() invocation returns an empty set.
> If it is invoked after entities are added it failes with the Exception below.
> The same test work if a binary-keyed-jdbc-store is used!
> The HotRod client is based on the hot-rod C/S quickstart.
> The configuration is:
> <subsystem xmlns="urn:infinispan:server:core:6.0" default-cache-container="clustered">
> <cache-container name="clustered" default-cache="string" statistics="true">
> <transport executor="infinispan-transport" lock-timeout="60000"/>
> <replicated-cache name="string" mode="ASYNC" start="EAGER">
> <locking isolation="READ_COMMITTED" acquire-timeout="20000" concurrency-level="500" striping="false"/>
> <transaction mode="NONE"/>
> <string-keyed-jdbc-store datasource="java:jboss/datasources/JDGDatasource" passivation="false" preload="true" purge="false" shared="false">
> <!-- property name="databaseType">ORACLE</property -->
> <string-keyed-table prefix="qs">
> <id-column name="id" type="VARCHAR(255)"/>
> <data-column name="datum" type="BLOB(2000)"/>
> <timestamp-column name="version" type="BIGINT"/>
> </string-keyed-table>
> <write-behind modification-queue-size="1024" shutdown-timeout="25000" flush-lock-timeout="15000" thread-pool-size="5" />
> </string-keyed-jdbc-store>
> <expiration interval="10000" />
> </replicated-cache>
> ERROR [org.infinispan.server.hotrod.HotRodDecoder:76] (HotRodServerWorker-88) ISPN005009: Unexpected error before any request parameters read: java.lang.ClassCastException: java.lang.String cannot be cast to [B
> at org.infinispan.server.hotrod.AbstractEncoder1x$$anonfun$writeResponse$5.apply(AbstractEncoder1x.scala:113) [infinispan.jar:7.0.0-SNAPSHOT]
> at scala.collection.Iterator$class.foreach(Iterator.scala:727)
> at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
> at org.infinispan.server.hotrod.AbstractEncoder1x.writeResponse(AbstractEncoder1x.scala:113) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.hotrod.HotRodEncoder.encode(HotRodEncoder.scala:48) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.doEncode(OneToOneEncoder.java:66) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.Channels.write(Channels.java:704) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.Channels.write(Channels.java:671) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248) [netty-3.6.6.Final.jar:]
> at org.infinispan.server.core.AbstractProtocolDecoder.writeResponse(AbstractProtocolDecoder.scala:163) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.hotrod.HotRodDecoder.customDecodeKey(HotRodDecoder.scala:138) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.core.AbstractProtocolDecoder.decodeKey(AbstractProtocolDecoder.scala:105) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.core.AbstractProtocolDecoder.decode(AbstractProtocolDecoder.scala:53) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.core.AbstractProtocolDecoder.decode(AbstractProtocolDecoder.scala:29) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435) [netty-3.6.6.Final.jar:]
> at org.infinispan.server.core.AbstractProtocolDecoder.messageReceived(AbstractProtocolDecoder.scala:377) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) [netty-3.6.6.Final.jar:]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ISPN-4125) ClassCastException if cache.keyset() is invoked for a string-keyed-jdbc-store in C/S mode
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-4125?page=com.atlassian.jira.plugin.... ]
Adrian Nistor commented on ISPN-4125:
-------------------------------------
Or maybe it's an even simpler case of ProtobufValueWrapper not being handled by DefaultTwoWayKey2StringMapper. I'll check this tomorrow and have a fix soon.
> ClassCastException if cache.keyset() is invoked for a string-keyed-jdbc-store in C/S mode
> -----------------------------------------------------------------------------------------
>
> Key: ISPN-4125
> URL: https://issues.jboss.org/browse/ISPN-4125
> Project: Infinispan
> Issue Type: Bug
> Reporter: Wolf-Dieter Fink
> Assignee: Adrian Nistor
>
> If the cache is empty cache.keyset() invocation returns an empty set.
> If it is invoked after entities are added it failes with the Exception below.
> The same test work if a binary-keyed-jdbc-store is used!
> The HotRod client is based on the hot-rod C/S quickstart.
> The configuration is:
> <subsystem xmlns="urn:infinispan:server:core:6.0" default-cache-container="clustered">
> <cache-container name="clustered" default-cache="string" statistics="true">
> <transport executor="infinispan-transport" lock-timeout="60000"/>
> <replicated-cache name="string" mode="ASYNC" start="EAGER">
> <locking isolation="READ_COMMITTED" acquire-timeout="20000" concurrency-level="500" striping="false"/>
> <transaction mode="NONE"/>
> <string-keyed-jdbc-store datasource="java:jboss/datasources/JDGDatasource" passivation="false" preload="true" purge="false" shared="false">
> <!-- property name="databaseType">ORACLE</property -->
> <string-keyed-table prefix="qs">
> <id-column name="id" type="VARCHAR(255)"/>
> <data-column name="datum" type="BLOB(2000)"/>
> <timestamp-column name="version" type="BIGINT"/>
> </string-keyed-table>
> <write-behind modification-queue-size="1024" shutdown-timeout="25000" flush-lock-timeout="15000" thread-pool-size="5" />
> </string-keyed-jdbc-store>
> <expiration interval="10000" />
> </replicated-cache>
> ERROR [org.infinispan.server.hotrod.HotRodDecoder:76] (HotRodServerWorker-88) ISPN005009: Unexpected error before any request parameters read: java.lang.ClassCastException: java.lang.String cannot be cast to [B
> at org.infinispan.server.hotrod.AbstractEncoder1x$$anonfun$writeResponse$5.apply(AbstractEncoder1x.scala:113) [infinispan.jar:7.0.0-SNAPSHOT]
> at scala.collection.Iterator$class.foreach(Iterator.scala:727)
> at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
> at org.infinispan.server.hotrod.AbstractEncoder1x.writeResponse(AbstractEncoder1x.scala:113) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.hotrod.HotRodEncoder.encode(HotRodEncoder.scala:48) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.doEncode(OneToOneEncoder.java:66) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.Channels.write(Channels.java:704) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.Channels.write(Channels.java:671) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248) [netty-3.6.6.Final.jar:]
> at org.infinispan.server.core.AbstractProtocolDecoder.writeResponse(AbstractProtocolDecoder.scala:163) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.hotrod.HotRodDecoder.customDecodeKey(HotRodDecoder.scala:138) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.core.AbstractProtocolDecoder.decodeKey(AbstractProtocolDecoder.scala:105) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.core.AbstractProtocolDecoder.decode(AbstractProtocolDecoder.scala:53) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.core.AbstractProtocolDecoder.decode(AbstractProtocolDecoder.scala:29) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435) [netty-3.6.6.Final.jar:]
> at org.infinispan.server.core.AbstractProtocolDecoder.messageReceived(AbstractProtocolDecoder.scala:377) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) [netty-3.6.6.Final.jar:]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ISPN-4125) ClassCastException if cache.keyset() is invoked for a string-keyed-jdbc-store in C/S mode
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-4125?page=com.atlassian.jira.plugin.... ]
Adrian Nistor reassigned ISPN-4125:
-----------------------------------
Assignee: Adrian Nistor (was: Mircea Markus)
> ClassCastException if cache.keyset() is invoked for a string-keyed-jdbc-store in C/S mode
> -----------------------------------------------------------------------------------------
>
> Key: ISPN-4125
> URL: https://issues.jboss.org/browse/ISPN-4125
> Project: Infinispan
> Issue Type: Bug
> Reporter: Wolf-Dieter Fink
> Assignee: Adrian Nistor
>
> If the cache is empty cache.keyset() invocation returns an empty set.
> If it is invoked after entities are added it failes with the Exception below.
> The same test work if a binary-keyed-jdbc-store is used!
> The HotRod client is based on the hot-rod C/S quickstart.
> The configuration is:
> <subsystem xmlns="urn:infinispan:server:core:6.0" default-cache-container="clustered">
> <cache-container name="clustered" default-cache="string" statistics="true">
> <transport executor="infinispan-transport" lock-timeout="60000"/>
> <replicated-cache name="string" mode="ASYNC" start="EAGER">
> <locking isolation="READ_COMMITTED" acquire-timeout="20000" concurrency-level="500" striping="false"/>
> <transaction mode="NONE"/>
> <string-keyed-jdbc-store datasource="java:jboss/datasources/JDGDatasource" passivation="false" preload="true" purge="false" shared="false">
> <!-- property name="databaseType">ORACLE</property -->
> <string-keyed-table prefix="qs">
> <id-column name="id" type="VARCHAR(255)"/>
> <data-column name="datum" type="BLOB(2000)"/>
> <timestamp-column name="version" type="BIGINT"/>
> </string-keyed-table>
> <write-behind modification-queue-size="1024" shutdown-timeout="25000" flush-lock-timeout="15000" thread-pool-size="5" />
> </string-keyed-jdbc-store>
> <expiration interval="10000" />
> </replicated-cache>
> ERROR [org.infinispan.server.hotrod.HotRodDecoder:76] (HotRodServerWorker-88) ISPN005009: Unexpected error before any request parameters read: java.lang.ClassCastException: java.lang.String cannot be cast to [B
> at org.infinispan.server.hotrod.AbstractEncoder1x$$anonfun$writeResponse$5.apply(AbstractEncoder1x.scala:113) [infinispan.jar:7.0.0-SNAPSHOT]
> at scala.collection.Iterator$class.foreach(Iterator.scala:727)
> at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
> at org.infinispan.server.hotrod.AbstractEncoder1x.writeResponse(AbstractEncoder1x.scala:113) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.hotrod.HotRodEncoder.encode(HotRodEncoder.scala:48) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.doEncode(OneToOneEncoder.java:66) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.Channels.write(Channels.java:704) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.Channels.write(Channels.java:671) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248) [netty-3.6.6.Final.jar:]
> at org.infinispan.server.core.AbstractProtocolDecoder.writeResponse(AbstractProtocolDecoder.scala:163) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.hotrod.HotRodDecoder.customDecodeKey(HotRodDecoder.scala:138) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.core.AbstractProtocolDecoder.decodeKey(AbstractProtocolDecoder.scala:105) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.core.AbstractProtocolDecoder.decode(AbstractProtocolDecoder.scala:53) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.core.AbstractProtocolDecoder.decode(AbstractProtocolDecoder.scala:29) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435) [netty-3.6.6.Final.jar:]
> at org.infinispan.server.core.AbstractProtocolDecoder.messageReceived(AbstractProtocolDecoder.scala:377) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) [netty-3.6.6.Final.jar:]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ISPN-4125) ClassCastException if cache.keyset() is invoked for a string-keyed-jdbc-store in C/S mode
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-4125?page=com.atlassian.jira.plugin.... ]
Adrian Nistor commented on ISPN-4125:
-------------------------------------
Ah, it's not a duplicate. This one is caused by the string based cache store which cannot turn the String back into a byte[]. The explanation for this failure can be seen in the javadoc of JdbcStringBasedStore. It's basically a documented limitation. The only thing I imagine we could do extra is have a fail fast check in JdbcStringBasedStore so such surprising failures would not occur later.
> ClassCastException if cache.keyset() is invoked for a string-keyed-jdbc-store in C/S mode
> -----------------------------------------------------------------------------------------
>
> Key: ISPN-4125
> URL: https://issues.jboss.org/browse/ISPN-4125
> Project: Infinispan
> Issue Type: Bug
> Reporter: Wolf-Dieter Fink
> Assignee: Mircea Markus
>
> If the cache is empty cache.keyset() invocation returns an empty set.
> If it is invoked after entities are added it failes with the Exception below.
> The same test work if a binary-keyed-jdbc-store is used!
> The HotRod client is based on the hot-rod C/S quickstart.
> The configuration is:
> <subsystem xmlns="urn:infinispan:server:core:6.0" default-cache-container="clustered">
> <cache-container name="clustered" default-cache="string" statistics="true">
> <transport executor="infinispan-transport" lock-timeout="60000"/>
> <replicated-cache name="string" mode="ASYNC" start="EAGER">
> <locking isolation="READ_COMMITTED" acquire-timeout="20000" concurrency-level="500" striping="false"/>
> <transaction mode="NONE"/>
> <string-keyed-jdbc-store datasource="java:jboss/datasources/JDGDatasource" passivation="false" preload="true" purge="false" shared="false">
> <!-- property name="databaseType">ORACLE</property -->
> <string-keyed-table prefix="qs">
> <id-column name="id" type="VARCHAR(255)"/>
> <data-column name="datum" type="BLOB(2000)"/>
> <timestamp-column name="version" type="BIGINT"/>
> </string-keyed-table>
> <write-behind modification-queue-size="1024" shutdown-timeout="25000" flush-lock-timeout="15000" thread-pool-size="5" />
> </string-keyed-jdbc-store>
> <expiration interval="10000" />
> </replicated-cache>
> ERROR [org.infinispan.server.hotrod.HotRodDecoder:76] (HotRodServerWorker-88) ISPN005009: Unexpected error before any request parameters read: java.lang.ClassCastException: java.lang.String cannot be cast to [B
> at org.infinispan.server.hotrod.AbstractEncoder1x$$anonfun$writeResponse$5.apply(AbstractEncoder1x.scala:113) [infinispan.jar:7.0.0-SNAPSHOT]
> at scala.collection.Iterator$class.foreach(Iterator.scala:727)
> at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
> at org.infinispan.server.hotrod.AbstractEncoder1x.writeResponse(AbstractEncoder1x.scala:113) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.hotrod.HotRodEncoder.encode(HotRodEncoder.scala:48) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.doEncode(OneToOneEncoder.java:66) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.Channels.write(Channels.java:704) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.Channels.write(Channels.java:671) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248) [netty-3.6.6.Final.jar:]
> at org.infinispan.server.core.AbstractProtocolDecoder.writeResponse(AbstractProtocolDecoder.scala:163) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.hotrod.HotRodDecoder.customDecodeKey(HotRodDecoder.scala:138) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.core.AbstractProtocolDecoder.decodeKey(AbstractProtocolDecoder.scala:105) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.core.AbstractProtocolDecoder.decode(AbstractProtocolDecoder.scala:53) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.core.AbstractProtocolDecoder.decode(AbstractProtocolDecoder.scala:29) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435) [netty-3.6.6.Final.jar:]
> at org.infinispan.server.core.AbstractProtocolDecoder.messageReceived(AbstractProtocolDecoder.scala:377) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) [netty-3.6.6.Final.jar:]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ISPN-4125) ClassCastException if cache.keyset() is invoked for a string-keyed-jdbc-store in C/S mode
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-4125?page=com.atlassian.jira.plugin.... ]
Adrian Nistor commented on ISPN-4125:
-------------------------------------
Isn't this a duplicate of ISPN-3976?
> ClassCastException if cache.keyset() is invoked for a string-keyed-jdbc-store in C/S mode
> -----------------------------------------------------------------------------------------
>
> Key: ISPN-4125
> URL: https://issues.jboss.org/browse/ISPN-4125
> Project: Infinispan
> Issue Type: Bug
> Reporter: Wolf-Dieter Fink
> Assignee: Mircea Markus
>
> If the cache is empty cache.keyset() invocation returns an empty set.
> If it is invoked after entities are added it failes with the Exception below.
> The same test work if a binary-keyed-jdbc-store is used!
> The HotRod client is based on the hot-rod C/S quickstart.
> The configuration is:
> <subsystem xmlns="urn:infinispan:server:core:6.0" default-cache-container="clustered">
> <cache-container name="clustered" default-cache="string" statistics="true">
> <transport executor="infinispan-transport" lock-timeout="60000"/>
> <replicated-cache name="string" mode="ASYNC" start="EAGER">
> <locking isolation="READ_COMMITTED" acquire-timeout="20000" concurrency-level="500" striping="false"/>
> <transaction mode="NONE"/>
> <string-keyed-jdbc-store datasource="java:jboss/datasources/JDGDatasource" passivation="false" preload="true" purge="false" shared="false">
> <!-- property name="databaseType">ORACLE</property -->
> <string-keyed-table prefix="qs">
> <id-column name="id" type="VARCHAR(255)"/>
> <data-column name="datum" type="BLOB(2000)"/>
> <timestamp-column name="version" type="BIGINT"/>
> </string-keyed-table>
> <write-behind modification-queue-size="1024" shutdown-timeout="25000" flush-lock-timeout="15000" thread-pool-size="5" />
> </string-keyed-jdbc-store>
> <expiration interval="10000" />
> </replicated-cache>
> ERROR [org.infinispan.server.hotrod.HotRodDecoder:76] (HotRodServerWorker-88) ISPN005009: Unexpected error before any request parameters read: java.lang.ClassCastException: java.lang.String cannot be cast to [B
> at org.infinispan.server.hotrod.AbstractEncoder1x$$anonfun$writeResponse$5.apply(AbstractEncoder1x.scala:113) [infinispan.jar:7.0.0-SNAPSHOT]
> at scala.collection.Iterator$class.foreach(Iterator.scala:727)
> at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
> at org.infinispan.server.hotrod.AbstractEncoder1x.writeResponse(AbstractEncoder1x.scala:113) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.hotrod.HotRodEncoder.encode(HotRodEncoder.scala:48) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.doEncode(OneToOneEncoder.java:66) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.Channels.write(Channels.java:704) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.Channels.write(Channels.java:671) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248) [netty-3.6.6.Final.jar:]
> at org.infinispan.server.core.AbstractProtocolDecoder.writeResponse(AbstractProtocolDecoder.scala:163) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.hotrod.HotRodDecoder.customDecodeKey(HotRodDecoder.scala:138) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.core.AbstractProtocolDecoder.decodeKey(AbstractProtocolDecoder.scala:105) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.core.AbstractProtocolDecoder.decode(AbstractProtocolDecoder.scala:53) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.infinispan.server.core.AbstractProtocolDecoder.decode(AbstractProtocolDecoder.scala:29) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435) [netty-3.6.6.Final.jar:]
> at org.infinispan.server.core.AbstractProtocolDecoder.messageReceived(AbstractProtocolDecoder.scala:377) [infinispan.jar:7.0.0-SNAPSHOT]
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90) [netty-3.6.6.Final.jar:]
> at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) [netty-3.6.6.Final.jar:]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years