[JBoss JIRA] Created: (ISPN-1370) 5.0.0.FINAL hangs in replication mode with 2 local nodes (works in 4.2.1.FINAL)
by Stuart Hughes (JIRA)
5.0.0.FINAL hangs in replication mode with 2 local nodes (works in 4.2.1.FINAL)
-------------------------------------------------------------------------------
Key: ISPN-1370
URL: https://issues.jboss.org/browse/ISPN-1370
Project: Infinispan
Issue Type: Bug
Components: Cache Server, Configuration
Affects Versions: 5.0.0.FINAL
Environment: Ubuntu 10.10 i686 (32bit)
Apache tomcat 6.0.28
java version "1.6.0_26" (Sun)
Maven 2.2.1
Reporter: Stuart Hughes
Assignee: Manik Surtani
Infinispan hangs when starting a second instance of a named cache in replication mode on the same host.
Program scenario:
Http servlet is used to cache pages using Infinispan
Web app started twice by Maven on different ports:
* mvn tomcat:run -Dmaven.tomcat.port=9090
* mvn tomcat:run -Dmaven.tomcat.port=9091
Infinispan XML config:
{code}
<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:5.0 http://www.infinispan.org/schemas/infinispan-config-5.0.xsd"
xmlns="urn:infinispan:config:5.0">
<global>
<transport/>
</global>
<default>
<clustering mode="repl">
</clustering>
</default>
<namedCache name="itemCache">
</namedCache>
<namedCache name="pageCache">
</namedCache>
</infinispan>
{code}
Code extract:
{code}
@Service
public class InfCachingService
implements ICachingService, ResourceLoaderAware {
private static final Logger logger = LoggerFactory.getLogger(InfCachingService.class);
private String configName = null;
protected Cache<Integer, ContentBase> itemCache;
protected Cache<String, PageCacheItem> pageCache;
@Value("${inf.config.file}")
void setConfig(String configName) {
this.configName = configName;
}
@Override
public void setResourceLoader(ResourceLoader resourceLoader) {
try {
String configFile = resourceLoader.getResource( configName ).getFile().getCanonicalPath();
createCaches(configFile);
} catch(Exception e) {
logger.error("Could not get resource file: "+ configName + " : " + e);
}
}
protected Boolean createCaches(String configFile) {
System.out.println("Creating infinispan CacheManager from XML config");
try {
DefaultCacheManager m = new DefaultCacheManager(configFile);
if ( pageCache != null ) {
throw new Exception("pageCache should not exists");
}
pageCache = m.getCache("pageCache");
System.out.println("pageCache created");
return true;
} catch(Exception e) {
logger.error("Could not create Caches:", e);
return false;
}
}
{code}
Log output on second jvm:
{code}
ISPN000088: Unable to use any JGroups configuration mechanisms provided in properties {}. Using default JGroups configuration!
New view accepted: [z200-59673|1] [z200-59673, z200-39342]
ISPN000094: Received new cluster view: [z200-59673|1] [z200-59673, z200-39342]
ISPN000079: Cache local address is z200-39342, physical addresses are [fe80:0:0:0:250:56ff:fec0:8:60576]
Waiting on view being accepted
ISPN000128: Infinispan version: Infinispan 'Pagoa' 5.0.0.CR8
Interceptor chain size: 6
Interceptor chain is:
>> org.infinispan.interceptors.InvocationContextInterceptor
>> org.infinispan.interceptors.TxInterceptor
>> org.infinispan.interceptors.NotificationInterceptor
>> org.infinispan.interceptors.LockingInterceptor
>> org.infinispan.interceptors.ReplicationInterceptor
>> org.infinispan.interceptors.CallInterceptor
Initiating state transfer process
ISPN000074: Trying to fetch state from z200-59673
New view accepted: MergeView::[z200-39342|3] [z200-39342, z200-59673], subgroups=[[z200-59673|2] [z200-59673], [z200-59673|1] [z200-39342]]
ISPN000093: Received new, MERGED cluster view: MergeView::[z200-39342|3] [z200-39342, z200-59673], subgroups=[[z200-59673|2] [z200-59673], [z200-59673|1] [z200-39342]]
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] Created: (ISPN-1303) More FileCacheStore optimizations
by Robert Stupp (JIRA)
More FileCacheStore optimizations
---------------------------------
Key: ISPN-1303
URL: https://issues.jboss.org/browse/ISPN-1303
Project: Infinispan
Issue Type: Enhancement
Components: Loaders and Stores
Affects Versions: 5.0.0.CR8
Reporter: Robert Stupp
Assignee: Manik Surtani
Still some more optimizations
1. added a check to prohibit purge at all, if the whole cache store does not contain any expireable cache entry (works great with non-expireable cache entries - like Lucene indexes)
2. added some more configuration options for purge:
2.a. minimum time to wait between to purge runs
2.b. minimum time to wait after last update to a bucket before purge run
2.c. maximum time to wait after the last purge run
3. prohibit purge run, if no update occured
4. prohibit purge test (and execution), if bucket file did not change after last purge run
Will attach source code.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] (ISPN-1514) Unmarshalling fails with oracle driver
by Thomas Fromm (Created) (JIRA)
Unmarshalling fails with oracle driver
--------------------------------------
Key: ISPN-1514
URL: https://issues.jboss.org/browse/ISPN-1514
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Affects Versions: 5.1.0.BETA3
Environment: Oracle Driver version 10.2.0.5.0
Reporter: Thomas Fromm
Assignee: Manik Surtani
Unmarshalling of value with oracle driver fails with:
2011-11-09 14:57:59,490 [ERROR] org.infinispan.loaders.jdbc.JdbcUtil - ISPN008009: I/O error while unmarshalling from stream
java.io.EOFException: Read past end of file
at org.jboss.marshalling.SimpleDataInput.eofOnRead(SimpleDataInput.java:126)
at org.jboss.marshalling.SimpleDataInput.readUnsignedByteDirect(SimpleDataInput.java:263)
at org.jboss.marshalling.SimpleDataInput.readUnsignedByte(SimpleDataInput.java:224)
at org.jboss.marshalling.river.RiverUnmarshaller.start(RiverUnmarshaller.java:1182)
at org.infinispan.marshall.jboss.AbstractJBossMarshaller.startObjectInput(AbstractJBossMarshaller.java:113)
at org.infinispan.marshall.VersionAwareMarshaller.startObjectInput(VersionAwareMarshaller.java:156)
at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:112)
at org.infinispan.marshall.AbstractMarshaller.objectFromInputStream(AbstractMarshaller.java:104)
at org.infinispan.loaders.jdbc.JdbcUtil.unmarshall(JdbcUtil.java:88)
at E04.main(E04.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.inubit.ibis.configuration.Bootstrap.main(Bootstrap.java:66)
org.infinispan.loaders.CacheLoaderException: I/O error while unmarshalling from stream
at org.infinispan.loaders.jdbc.JdbcUtil.unmarshall(JdbcUtil.java:91)
at E04.main(E04.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.inubit.ibis.configuration.Bootstrap.main(Bootstrap.java:66)
Caused by: java.io.EOFException: Read past end of file
at org.jboss.marshalling.SimpleDataInput.eofOnRead(SimpleDataInput.java:126)
at org.jboss.marshalling.SimpleDataInput.readUnsignedByteDirect(SimpleDataInput.java:263)
at org.jboss.marshalling.SimpleDataInput.readUnsignedByte(SimpleDataInput.java:224)
at org.jboss.marshalling.river.RiverUnmarshaller.start(RiverUnmarshaller.java:1182)
at org.infinispan.marshall.jboss.AbstractJBossMarshaller.startObjectInput(AbstractJBossMarshaller.java:113)
at org.infinispan.marshall.VersionAwareMarshaller.startObjectInput(VersionAwareMarshaller.java:156)
at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:112)
at org.infinispan.marshall.AbstractMarshaller.objectFromInputStream(AbstractMarshaller.java:104)
at org.infinispan.loaders.jdbc.JdbcUtil.unmarshall(JdbcUtil.java:88)
... 6 more
Solution:
In AbstractMarshaller.objectFromInputStream is assumed, that the available() method from the incoming InputStream returns the size of data.
But this is optional, so the InputStream from the oracle driver returns 0. So implementation of objectFromInputStream must be changed to avoid usage of available().
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] (ISPN-1570) Can't configure async caches with new config builder
by Galder Zamarreño (Created) (JIRA)
Can't configure async caches with new config builder
----------------------------------------------------
Key: ISPN-1570
URL: https://issues.jboss.org/browse/ISPN-1570
Project: Infinispan
Issue Type: Bug
Components: Configuration
Affects Versions: 5.1.0.BETA5
Reporter: Galder Zamarreño
Assignee: Pete Muir
Fix For: 5.1.0.CR1
The following test:
{code}public void testReplAsyncWithQueue() {
Configuration configuration = new ConfigurationBuilder()
.clustering().cacheMode(CacheMode.REPL_ASYNC)
.async().useReplQueue(true).replQueueInterval(1222)
.build();
org.infinispan.config.Configuration legacy = new LegacyConfigurationAdaptor().adapt(configuration);
}{code}
Fails with:
{code}java.lang.IllegalStateException: Cannot configure a async for an sync cache. Set the cache mode to async first.
at org.infinispan.configuration.cache.ClusteringConfigurationBuilder.async(ClusteringConfigurationBuilder.java:32)
at org.infinispan.configuration.ConfigurationUnitTest.testReplAsyncWithQueue(ConfigurationUnitTest.java:81){code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months