[JBoss JIRA] (ISPN-2033) JdbcBinaryCacheStore.purgeInternal() - releaseConnection() should be called in finally block.
by Jim Dunkerton (JIRA)
Jim Dunkerton created ISPN-2033:
-----------------------------------
Summary: JdbcBinaryCacheStore.purgeInternal() - releaseConnection() should be called in finally block.
Key: ISPN-2033
URL: https://issues.jboss.org/browse/ISPN-2033
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Affects Versions: 5.1.2.FINAL
Environment: JBoss 7.1.1 Final
Reporter: Jim Dunkerton
Assignee: Manik Surtani
A potential memory leak of pooled DB connections is present in JdbcCacheBinaryStore. Observe the catch and finally blocks of the purgeInternal() method:
catch (SQLException ex) {
//if something happens make sure buckets locks are being release
releaseLocks(expiredBuckets);
connectionFactory.releaseConnection(conn);
log.failedClearingJdbcCacheStore(ex);
throw new CacheLoaderException("Failed clearing JdbcBinaryCacheStore", ex);
} finally {
JdbcUtil.safeClose(ps);
JdbcUtil.safeClose(rs);
}
The pooled DB connection is not released unless an SQLException has been thrown.
Contrast with JdbcStringBasedCacheStore.purgeInternal():
} catch (SQLException ex) {
log.failedClearingJdbcCacheStore(ex);
throw new CacheLoaderException("Failed clearing string based JDBC store", ex);
} finally {
JdbcUtil.safeClose(ps);
connectionFactory.releaseConnection(conn);
}
When using a JdbcMixedCacheStore, I noticed a DB connection leak. It appeared that for every two connections being acquired, only one was being released. I believe it is down to the fact that the JdbcBinaryCacheStore inside the JdbcMixedCacheStore is not releasing its connections properly (i.e. in its finally block) whereas the JdbcStringBasedCacheStore is.
I guess a workaround is to use only a JdbcStringBasedCacheStore, not a JdbcMixedCacheStore.
--
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
11 years, 6 months
[JBoss JIRA] (ISPN-2320) X-Site MBeans for operations and statistics
by Tristan Tarrant (JIRA)
Tristan Tarrant created ISPN-2320:
-------------------------------------
Summary: X-Site MBeans for operations and statistics
Key: ISPN-2320
URL: https://issues.jboss.org/browse/ISPN-2320
Project: Infinispan
Issue Type: Feature Request
Components: cross-site replication
Affects Versions: 5.2.0.Alpha3
Reporter: Tristan Tarrant
Assignee: Mircea Markus
Fix For: 5.2.0.Final
The new Backup* classes should add MBean operations for enabling/disabling x-site backup functionality temporarily, changing timeouts and attributes for retrieving statistics about success/failures/etc
--
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
11 years, 7 months
[JBoss JIRA] (ISPN-2297) Cache restart doesn't work properly
by Dan Berindei (JIRA)
Dan Berindei created ISPN-2297:
----------------------------------
Summary: Cache restart doesn't work properly
Key: ISPN-2297
URL: https://issues.jboss.org/browse/ISPN-2297
Project: Infinispan
Issue Type: Bug
Reporter: Dan Berindei
Assignee: Mircea Markus
Cache restart has at least two issues:
1. If a cache is stopped via {{Cache.stop()}} it will still be returned by {{DefaultCacheManager.getCache()}}. Cache {{start()}} and {{stop()}} are not synchronized in any way, so a {{start()}} call may return before the cache was properly started - just because another thread is in the process of starting it.
2. {{ComponentRegistry}} keeps a few components as fields to speed up access. These components are destroyed on {{stop()}} and re-created on {{start()}}, because they are volatile, but the field references are not updated.
Also, the documentation of {{EmbeddedCacheManager.getCache()}} should say that it will start the cache only if it doesn't exist yet - if the cache is stopped it will return the cache as it was. Alternatively we could change the behaviour of {{getCache()}} to always start the cache.
--
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
11 years, 7 months
[JBoss JIRA] (ISPN-2330) JBossMarshaller uses wrong class resolver after stop/start
by Dennis Reed (JIRA)
Dennis Reed created ISPN-2330:
---------------------------------
Summary: JBossMarshaller uses wrong class resolver after stop/start
Key: ISPN-2330
URL: https://issues.jboss.org/browse/ISPN-2330
Project: Infinispan
Issue Type: Bug
Components: Marshalling
Affects Versions: 5.1.4.FINAL
Reporter: Dennis Reed
Assignee: Galder Zamarreño
org.infinispan.marshall.jboss.JBossMarshaller initializes the classResolver in its inject() method and clears it in its stop() method.
If the cache is stopped and restarted (for example when redeploying a clustered web app in EAP), the wrong class resolver is used.
Either the classResolver should not be removed in stop() (testing with it removed did not show any class leaking issues), or it should be reset in start().
--
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
11 years, 7 months