[JBoss JIRA] (ISPN-9451) When fail-silently is false, the system will behave based on persistence configuration
by Ryan Emerson (Jira)
[ https://issues.jboss.org/browse/ISPN-9451?page=com.atlassian.jira.plugin.... ]
Ryan Emerson commented on ISPN-9451:
------------------------------------
[~dlovison] To clarify, the reason that startup is failing is not at all related to write-behind and therefore `fail-silently` is irrelevant. The same behaviour will be encountered with/without write-behind enabled for the store. What you describe is not a bug, it's expected behaviour.
> 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)
7 years, 2 months
[JBoss JIRA] (ISPN-2575) Key Transformer registration is required on all nodes of the cluster, in case of custom keys
by Adrian Nistor (Jira)
[ https://issues.jboss.org/browse/ISPN-2575?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-2575:
--------------------------------
Sprint: Sprint 9.4.0.Final
> Key Transformer registration is required on all nodes of the cluster, in case of custom keys
> --------------------------------------------------------------------------------------------
>
> Key: ISPN-2575
> URL: https://issues.jboss.org/browse/ISPN-2575
> Project: Infinispan
> Issue Type: Enhancement
> Components: Embedded Querying
> Affects Versions: 5.2.0.Beta5
> Reporter: Anna Manukyan
> Assignee: Adrian Nistor
> Priority: Minor
> Fix For: 9.4.0.Final
>
> Attachments: ClusteredCacheTest.java
>
>
> The case is the following:
> I have a clustered cache on which I want to perform a search. I'm doing the following:
> I'm initializing SearchManager on node1, I'm registering a custom key transformer for my key using the created searchmanager, but then when I'm trying to put data into the cache on node1 (which is in REPL_SYNC mode with cache on node2), I'm getting the exception:
> java.lang.IllegalArgumentException: Indexing only works with entries keyed on Strings, primitives and classes that have the @Transformable annotation - you passed in a class org.infinispan.query.test.CustomKey3. Alternatively, see org.infinispan.query.SearchManager#registerKeyTransformer
> When I'm initializing the SearchManager using node2 cache and register the keyTransformer on it as well, then everything works perfectly, even though I am not using the second created SearchManager.
> The test which reproduces the issue is attached to the jira. Please see the test case: testSearchKeyTransformer()
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 2 months