[JBoss JIRA] Created: (ISPN-385) Add idle timeout to memcached and hot rod servers.
by Galder Zamarreno (JIRA)
Add idle timeout to memcached and hot rod servers.
--------------------------------------------------
Key: ISPN-385
URL: https://jira.jboss.org/jira/browse/ISPN-385
Project: Infinispan
Issue Type: Task
Components: Cache Server
Reporter: Galder Zamarreno
Assignee: Galder Zamarreno
Fix For: 4.1.0.BETA1
Add an IdleStateHandler to memcached and hot rod servers so that idle connections can be closed automatically. This is necessary to handle error conditions such as cases where clients erroneously indicate the server that it needs to read 20 bytes but they only send 10 bytes. Without such handler, the server will carry on waiting for bytes forever. The handler will provide a defence mechanism for such cases.
The timeout will be configurable via the command line. Besides, clients wanting to do some connection pooling will require to configure this accordingly in the server. In other words, there's hardly any point in having servers configured with idle timeout of 30 seconds and clients closing connections after 60 seconds of idle time. These two should be aligned accordingly.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years
[JBoss JIRA] (ISPN-1503) NullPointerException in BatchingInterceptor when using nontransactional cache
by Aaron Douglas (Created) (JIRA)
NullPointerException in BatchingInterceptor when using nontransactional cache
-----------------------------------------------------------------------------
Key: ISPN-1503
URL: https://issues.jboss.org/browse/ISPN-1503
Project: Infinispan
Issue Type: Bug
Components: Transactions
Affects Versions: 5.1.0.BETA3
Reporter: Aaron Douglas
Assignee: Mircea Markus
When setting a cache to non-transactional with the following configuration statement:
{code:xml}
<transaction transactionMode="NON_TRANSACTIONAL" />
{code}
I'm getting a NullPointerException in org.infinispan.interceptors.BatchingInterceptor.handleDefault(InvocationContext, VisitableCommand) because there is no transaction manager defined. This is occurring in the fifth line below:
{code}
protected Object handleDefault(InvocationContext ctx, VisitableCommand command) throws Throwable {
Transaction tx;
if (!ctx.isOriginLocal()) return invokeNextInterceptor(ctx, command);
// if in a batch, attach tx
if (transactionManager.getTransaction() == null && (tx = batchContainer.getBatchTransaction()) != null) {
try {
transactionManager.resume(tx);
//If there's no ongoing tx then BatchingInterceptor creates one and then invokes next interceptor,
// so that all interceptors in the stack will be executed in a transactional context.
// This is where a new context (TxInvocationContext) is created, as the existing context is not transactional: NonTxInvocationContext.
InvocationContext txContext = icc.createInvocationContext(true);
txContext.setFlags(ctx.getFlags());
return invokeNextInterceptor(txContext, command);
} finally {
if (transactionManager.getTransaction() != null && batchContainer.isSuspendTxAfterInvocation())
transactionManager.suspend();
}
} else {
return invokeNextInterceptor(ctx, command);
}
}
{code}
And the stacktrace:
{noformat}
Caused by: java.lang.NullPointerException
at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:63) [infinispan-core-5.1.0.BETA3.jar:]
at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:95) [infinispan-core-5.1.0.BETA3.jar:]
at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:61) [infinispan-core-5.1.0.BETA3.jar:]
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:318) [infinispan-core-5.1.0.BETA3.jar:]
at org.infinispan.CacheImpl.get(CacheImpl.java:262) [infinispan-core-5.1.0.BETA3.jar:]
at org.infinispan.DecoratedCache.get(DecoratedCache.java:292) [infinispan-core-5.1.0.BETA3.jar:]
at org.infinispan.lucene.FileListOperations.getFileList(FileListOperations.java:55) [infinispan-lucene-directory-5.1.0.BETA3.jar:]
at org.infinispan.lucene.InfinispanDirectory.list(InfinispanDirectory.java:183) [infinispan-lucene-directory-5.1.0.BETA3.jar:]
at org.infinispan.lucene.InfinispanDirectory.listAll(InfinispanDirectory.java:338) [infinispan-lucene-directory-5.1.0.BETA3.jar:]
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:623) [lucene-core-3.1.0.jar:]
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:575) [lucene-core-3.1.0.jar:]
at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:346) [lucene-core-3.1.0.jar:]
at org.apache.lucene.index.IndexReader.indexExists(IndexReader.java:808) [lucene-core-3.1.0.jar:]
at org.hibernate.search.store.DirectoryProviderHelper.initializeIndexIfNeeded(DirectoryProviderHelper.java:157) [hibernate-search-3.4.1.Final.jar:]
at org.hibernate.search.infinispan.InfinispanDirectoryProvider.start(InfinispanDirectoryProvider.java:88) [hibernate-search-infinispan-3.4.1.Final.jar:]
at org.hibernate.search.store.DirectoryProviderFactory.startDirectoryProviders(DirectoryProviderFactory.java:144) [hibernate-search-3.4.1.Final.jar:]
at org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:403) [hibernate-search-3.4.1.Final.jar:]
at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:262) [hibernate-search-3.4.1.Final.jar:]
at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:144) [hibernate-search-3.4.1.Final.jar:]
at org.hibernate.search.event.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:151) [hibernate-search-3.4.1.Final.jar:]
at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198) [hibernate-core-3.6.6.Final.jar:]
at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181) [hibernate-core-3.6.6.Final.jar:]
at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:194) [hibernate-core-3.6.6.Final.jar:]
... 40 more
{noformat}
--
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
[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
[JBoss JIRA] (ISPN-1598) Fix misspellings in new Configuration API
by Paul Ferraro (Created) (JIRA)
Fix misspellings in new Configuration API
-----------------------------------------
Key: ISPN-1598
URL: https://issues.jboss.org/browse/ISPN-1598
Project: Infinispan
Issue Type: Bug
Components: Configuration
Affects Versions: 5.1.0.CR1
Reporter: Paul Ferraro
Assignee: Manik Surtani
Priority: Minor
While browsing the new API, I've noticed a few misspelled method names:
TransactionConfigurationBuilder.transactionSyncrontizationRegisteryLookup(...)
StateRetrievalConfiguration.maxNonPorgressingLogWrites()
StateRetrievalConfigurationBuilder.maxNonPorgressingLogWrites(...)
There may be others, it's hard to tell.
Bonus points if you can implement a camelCase spellchecker plugin for Eclipse...
--
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
[JBoss JIRA] (ISPN-1597) Jdbc binary cache store throwing conversion error when working with PostgreSQL
by Martin Gencur (Created) (JIRA)
Jdbc binary cache store throwing conversion error when working with PostgreSQL
------------------------------------------------------------------------------
Key: ISPN-1597
URL: https://issues.jboss.org/browse/ISPN-1597
Project: Infinispan
Issue Type: Bug
Reporter: Martin Gencur
Assignee: Martin Gencur
This is very similar problem to ISPN-1592. So the solution will be to handle the PostgreSQL case specifically and use its CAST function (http://www.postgresql.org/docs/8.3/static/typeconv-func.html)
{code}
15:42:24,753 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (HotRodServerWorker-1-2) ISPN000136: Execution error: org.infinispan.loaders.CacheLoaderException: Sql failure while loading key: 1892343808
[java] at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.loadBucket(JdbcBinaryCacheStore.java:277)
[java] at org.infinispan.loaders.bucket.BucketBasedCacheStore.loadLockSafe(BucketBasedCacheStore.java:60) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.loaders.bucket.BucketBasedCacheStore.loadLockSafe(BucketBasedCacheStore.java:49) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.loaders.LockSupportCacheStore.load(LockSupportCacheStore.java:130) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:130) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.CacheLoaderInterceptor.visitPutKeyValueCommand(CacheLoaderInterceptor.java:79) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.EntryWrappingInterceptor.invokeNextAndApplyChanges(EntryWrappingInterceptor.java:188) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.EntryWrappingInterceptor.visitPutKeyValueCommand(EntryWrappingInterceptor.java:137) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.visitPutKeyValueCommand(OptimisticLockingInterceptor.java:108) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:133) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:61) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:214) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:152) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:115) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:119) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:107) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:67) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:61) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:318) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:919) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.CacheImpl.put(CacheImpl.java:633) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.CacheImpl.put(CacheImpl.java:625) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.AbstractDelegatingCache.put(AbstractDelegatingCache.java:114) [infinispan-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.server.core.AbstractProtocolDecoder.put(AbstractProtocolDecoder.scala:187) [infinispan-server-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.server.core.AbstractProtocolDecoder.decodeValue(AbstractProtocolDecoder.scala:141) [infinispan-server-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.server.core.AbstractProtocolDecoder.decode(AbstractProtocolDecoder.scala:71) [infinispan-server-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.server.core.AbstractProtocolDecoder.decode(AbstractProtocolDecoder.scala:44) [infinispan-server-core-5.1.0-SNAPSHOT.jar:]
[java] at org.jboss.netty.handler.codec.replay.CustomReplayingDecoder.callDecode(CustomReplayingDecoder.java:250) [infinispan-server-core-5.1.0-SNAPSHOT.jar:]
[java] at org.jboss.netty.handler.codec.replay.CustomReplayingDecoder.messageReceived(CustomReplayingDecoder.java:223) [infinispan-server-core-5.1.0-SNAPSHOT.jar:]
[java] at org.infinispan.server.core.AbstractProtocolDecoder.messageReceived(AbstractProtocolDecoder.scala:351) [infinispan-server-core-5.1.0-SNAPSHOT.jar:]
[java] at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80) [netty-3.2.5.Final.jar:]
[java] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty-3.2.5.Final.jar:]
[java] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) [netty-3.2.5.Final.jar:]
[java] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274) [netty-3.2.5.Final.jar:]
[java] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261) [netty-3.2.5.Final.jar:]
[java] at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349) [netty-3.2.5.Final.jar:]
[java] at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280) [netty-3.2.5.Final.jar:]
[java] at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200) [netty-3.2.5.Final.jar:]
[java] at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty-3.2.5.Final.jar:]
[java] at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44) [netty-3.2.5.Final.jar:]
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_21]
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_21]
[java] at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]
[java] Caused by: com.sybase.jdbc4.jdbc.SybSQLException: Implicit conversion from datatype 'INT' to 'VARCHAR' is not allowed. Use the CONVERT function to run this query.
[java] at com.sybase.jdbc4.tds.Tds.a(Unknown Source)
[java] at com.sybase.jdbc4.tds.Tds.nextResult(Unknown Source)
[java] at com.sybase.jdbc4.jdbc.ResultGetter.nextResult(Unknown Source)
[java] at com.sybase.jdbc4.jdbc.SybStatement.nextResult(Unknown Source)
[java] at com.sybase.jdbc4.jdbc.SybStatement.nextResult(Unknown Source)
[java] at com.sybase.jdbc4.jdbc.SybStatement.queryLoop(Unknown Source)
[java] at com.sybase.jdbc4.jdbc.SybStatement.executeQuery(Unknown Source)
[java] at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeQuery(Unknown Source)
[java] at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
[java] at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.loadBucket(JdbcBinaryCacheStore.java:266)
[java] ... 54 more
{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