[JBoss JIRA] Created: (ISPN-1300) Reduce number of files generated by FileCacheStore
by Robert Stupp (JIRA)
Reduce number of files generated by FileCacheStore
--------------------------------------------------
Key: ISPN-1300
URL: https://issues.jboss.org/browse/ISPN-1300
Project: Infinispan
Issue Type: Enhancement
Reporter: Robert Stupp
Assignee: Manik Surtani
The current implementation of FileCacheStore creates one file for each hash key - which results in up to 4.2 billion files (2^32).
It should limit the number of files to
a) improve performance of purge
b) reduce number of open file handles (system resources)
c) reduce number of Java objects/heap (JVM resources)
d) improve performance
The implementation allows us to do so.
Only 4 lines of code are necessary in FileCacheStore implementation:
private int hashKeyMask = 0xfffffc00; // TODO should get a configuration entry
@Override
protected Integer getLockFromKey(Object key) {
return Integer.valueOf(key.hashCode() & hashKeyMask);
}
This reduces the number of files to 2^22 = 4,194,304 files. Since each application and each cache store has different semantics the hasKeyMask value should be configurable - best would be to configure the number of bits.
Side effect: If someone changes the FileCacheStore hasKeyMask, the whole cache store becomes unuseable. So I opened another enhancement ...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 5 months
[JBoss JIRA] Commented: (ISPN-20) check whether locking in JDBC cache stores can be replaced with SELECT FOR UPDATE
by Robert Stupp (JIRA)
[ https://issues.jboss.org/browse/ISPN-20?page=com.atlassian.jira.plugin.sy... ]
Robert Stupp commented on ISPN-20:
----------------------------------
You cannot assume, that all databases support transactions at all.
MySQL/MyISAM does not support transactions
MySQL/InnoDB supports transactions
MyQSL/NDB ???
SQL-Server supports transactions, but real row-level locking is a nightmare with it
Oracle - works - row level locking - has some "special" SQL that's great for this issue (read/write lock / exists-check) - don't remenmber the exact use
DB2 - works - but don't how locking is implemented (page / row ??)
> check whether locking in JDBC cache stores can be replaced with SELECT FOR UPDATE
> ---------------------------------------------------------------------------------
>
> Key: ISPN-20
> URL: https://issues.jboss.org/browse/ISPN-20
> Project: Infinispan
> Issue Type: Feature Request
> Components: Loaders and Stores, Locking and Concurrency
> Reporter: Mircea Markus
> Assignee: Galder Zamarreño
> Labels: hackathon
> Fix For: 5.1.0.BETA1, 5.1.0.FINAL
>
>
> Not sure whether the 'outside' locking (MVCC) can't be used so that we won't need locking code within cache stores
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 5 months
[JBoss JIRA] Created: (ISPN-1276) warn when using indexing but query module isn't present on classpath
by Michal Linhard (JIRA)
warn when using indexing but query module isn't present on classpath
--------------------------------------------------------------------
Key: ISPN-1276
URL: https://issues.jboss.org/browse/ISPN-1276
Project: Infinispan
Issue Type: Feature Request
Components: Configuration, Querying
Affects Versions: 5.0.0.CR8
Reporter: Michal Linhard
Assignee: Manik Surtani
It is possible to use indexing in the config xml:
{code}
<infinispan>
<default>
<invocationBatching enabled="true" />
<indexing enabled="true" indexLocalOnly="true">
<properties>
<property name="hibernate.search.default.directory_provider" value="ram" />
</properties>
</indexing>
</default>
</infinispan>
{code}
but without query module + it's dependencies on the classpath.
I'd expect to be warned in such case...
what happens is that LocalQueryInterceptor isn't added to the interceptor chain and indexing is not used, nothing is reported ...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 5 months