Hide Forgot
Title: File System Based Cache Stores Describe the issue: FileCacheStore is deprecated for infinispan 6.0.0 and SingleFileStore should be used Suggestions for improvement: FileCacheStore --> SingleFileStore Additional information: Not exactly sure, need to ask developers about that, because for version 5.3.0 it still remains and JDG server still has infinispan:server:core:5.3 in its configuration file
While the new file-based cachestore is called SingleFileStore, it replaces the old FileCacheStore without any configuration changes. Also the SingleFileStore on startup will detect the files from the old FileCacheStore and transparently migrate the data to the new format.
Thanks, Tristan. Changes: 1. straightforward search and replace FileCacheStore -> SingleFileStore in the following topics: * 14.1. File System Based Cache Stores * 14.1.1. Single File Store Configuration (Remote Client-Server Mode) * 14.1.2. Single File Store Configuration (Library Mode) * 17.2.2. Configure the Cache Loader using XML * 17.2.3. Configure the Cache Loader Programmatically Question: * In another topic, we use the following in a programmatic config: ConfigurationBuilder builder = new ConfigurationBuilder(); builder.loaders() .passivation(false) .shared(false) .preload(true) .addFileCacheStore() <<-- name change? * In another instance, we have this as part of a config: <loader class="org.infinispan.loaders.file.FileCacheStore" <-- any change?
(In reply to Misha H. Ali from comment #3) > Thanks, Tristan. > > Changes: > > 1. straightforward search and replace FileCacheStore -> SingleFileStore in > the following topics: > > * 14.1. File System Based Cache Stores > * 14.1.1. Single File Store Configuration (Remote Client-Server Mode) > * 14.1.2. Single File Store Configuration (Library Mode) > * 17.2.2. Configure the Cache Loader using XML > * 17.2.3. Configure the Cache Loader Programmatically > > Question: > > * In another topic, we use the following in a programmatic config: > > ConfigurationBuilder builder = new ConfigurationBuilder(); > builder.loaders() > .passivation(false) > .shared(false) > .preload(true) > .addFileCacheStore() <<-- name change? > > * In another instance, we have this as part of a config: > > <loader class="org.infinispan.loaders.file.FileCacheStore" <-- any change? Not onle name Misha ConfigurationBuilder builder = new ConfigurationBuilder(); builder.persistence().passivation(false).addSingleFileStore().location("/tmp/cache/").shared(false).preload(true);
For declarative (library mode) configs: * Replaced <loader> with <store> here: Admin Guide: -19.1.2. Write-Through Caching Configuration (Library Mode) Developer Guide: - None found * Replaced <loaders> with <persistence> here: Admin Guide: - 14.5.4. Sample XML Configuration (this title will change) - 16.1.2. JdbcBinaryCacheStore Configuration (Library Mode) - 16.2.2. JdbcStringBasedCacheStore Configuration (Library Mode) - 16.3.2. JdbcMixedCacheStore Configuration (Library Mode) - 17.2.2. Configure the Cache Loader using XML - 18.2. Configure Passivation - 19.1.2. Write-Through Caching Configuration (Library Mode) - 19.2.3. Unscheduled Write-Behind Strategy Configuration (Library Mode) Developer Guide: - None found Phew, I think that should be all the instances. Can you have a look and verify they are now correct please, Vitalii.
I filed already bugs where I see some code snippet problems And I think chapter 17 could be removed from admin guide because it's related to old version. But we should ask developers maybe they still use it somewhere
Thanks Vitalii. I'm flagging Tristan here to confirm whether we should exclude the Cache Loader config information. If we don't use these configs anymore, I can just add the "What is a cache loader" information to the cache store chaper.
For the declarative configuration we should use the modern style. Instead of <persistence> <store class="org.infinispan.persistence.file.SingleFileStore"> <properties> <property name="location" value="/tmp/Another-FileCacheStore-Location"/> </properties> </store> </persistence> we should be using: <persistence> <singleFile location="/tmp/Another-FileCacheStore-Location"/> </persistence>
Thanks, Tristan. Can I get you to confirm that the config should discard all the config elements and just be this config: <persistence> <singleFile location="/tmp/Another-FileCacheStore-Location"/> </persistence> Or do we use this modern style and retain the other elements, for example: <persistence passivation="false"> <store class="org.infinispan.persistence.file.SingleFileStore" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false"> <properties> <singleFile location="/tmp/Another-FileCacheStore-Location"/> </properties> </store> </persistence>
You mixed everything up there :) <persistence passivation="false"> <singleFile fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false" shared="false" preload="false" location="/tmp/Another-FileCacheStore-Location"> <async enabled="true" threadPoolSize="500" /> </singleFile> </persistence>
Thanks, Tristan. This should be fixed now. Vitalii, could you QE this please: http://docbuilder.usersys.redhat.com/12532/#Single_File_Store_Configuration_Library_Mode
Yes Tristan is right! And thanks Misha! Bug is verified
The fix for this bug is now generally released and available here: https://access.redhat.com/site/documentation/en-US/Red_Hat_JBoss_Data_Grid/6.2/index.html