[infinispan-issues] [JBoss JIRA] (ISPN-9451) When fail-silently is false, the system will behave based on persistence configuration
Ryan Emerson (Jira)
issues at jboss.org
Thu Oct 4 09:27:00 EDT 2018
[ https://issues.jboss.org/browse/ISPN-9451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan Emerson resolved ISPN-9451.
--------------------------------
Resolution: Explained
> When fail-silently is false, the system will behave based on persistence configuration
> --------------------------------------------------------------------------------------
>
> Key: ISPN-9451
> URL: https://issues.jboss.org/browse/ISPN-9451
> Project: Infinispan
> Issue Type: Bug
> Reporter: Diego Lovison
> Assignee: Ryan Emerson
> Priority: Critical
>
> Using the configuration below when the store is not available, the system won't fail at the first time.
> {code:xml}
> <?xml version="1.0" ?>
> <infinispan>
> <jgroups>
> <stack-file name="external-file" path="default-jgroups-tcp.xml"/>
> </jgroups>
> <cache-container name="myCacheContainer" default-cache="myCache" statistics="true">
> <transport cluster="WeatherApp" stack="external-file" />
> <distributed-cache owners="2" mode="SYNC" remote-timeout="15000" name="myCache">
> <transaction mode="NONE"/>
> <persistence connection-attempts="5" connection-interval="2000">
> <string-keyed-jdbc-store fetch-state="false" purge="false" read-only="false" shared="true">
> <write-behind fail-silently="false" />
> <string-keyed-table prefix="ISPN_STRING_TABLE" create-on-start="true">
> <id-column name="ID_COLUMN" type="VARCHAR(255)"/>
> <data-column name="DATA_COLUMN" type="BINARY"/>
> <timestamp-column name="TIMESTAMP_COLUMN" type="BIGINT"/>
> </string-keyed-table>
> <connection-pool
> connection-url="jdbc:h2:~/test;FILE_LOCK=SOCKET"
> driver="org.h2.Driver" username="sa"/>
> </string-keyed-jdbc-store>
> </persistence>
> </distributed-cache>
> </cache-container>
> </infinispan>
> {code}
> To reproduce the issue, you should start the application twice.
> The first application will work fine. The second one will fail 5 times before stops working.
> The fail-silently is "false" so it should fail at the first time.
> {code:java}
> public class ConfigurationFileCacheExample {
> public static void main(String[] args) throws InterruptedException, IOException {
> EmbeddedCacheManager cacheManager = new DefaultCacheManager("cache-jdbc-store.xml");
> try {
> Cache<String, LocationWeather> cache = cacheManager.getCache("weather");
> System.out.println(cache.size());
> while (true) {
> String location = UUID.randomUUID().toString();
> cache.put(location, new LocationWeather(37, location));
> TimeUnit.SECONDS.sleep(1);
> }
> } finally {
> cacheManager.stop();
> }
> }
> }
> {code}
>
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the infinispan-issues
mailing list