ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikolay Izhikov <nizhi...@apache.org>
Subject Re: Data vanished from cluster after INACTIVE/ACTIVE switch
Date Thu, 30 Jan 2020 09:46:42 GMT
Hello, Alexey.

Thanks for the feedback.
It seems for me as a very unexpected behavior from the users point of view.

I propose to do the following:

* Update Ignite documentation and write down the fact that in-memory cache cleared on deactivation.
* Disallow, by default, deactivation of the cluster that has in-memory cache with proper error
message
	«Your cluster has in-memory cache configured. During deactivation all data from these caches
will be cleared!»
* Add «—force» flag to deactivate command so administrator can force deactivation for
cluster that has both - persistent and in-memory caches configured.

What do you think?


> 30 янв. 2020 г., в 12:32, Alexey Goncharuk <alexey.goncharuk@gmail.com> написал(а):
> 
> Nikolay,
> 
> Inactive state deallocates all possible resources by design, including the
> data regions. If data region is not backed by a persistent storage, the
> data is lost, this is an expected behavior.
> 
> ср, 29 янв. 2020 г. в 19:18, Nikolay Izhikov <nizhikov@apache.org>:
> 
>> Hello, Igniters.
>> 
>> I found really confusing results of the simple test.
>> Data from the in-memory cache are vanished after change cluster state to
>> INACTIVE/ACTIVE.
>> 
>> Is this a bug or expected behavior?
>> 
>> 
>> ```
>> public class ClusterDeactivateTest extends GridCommonAbstractTest {
>>    String name = "my-cache";
>> 
>>    /** */
>>    @Test
>>    public void testDataPresent() throws Exception {
>>        IgniteEx i = startGrid(0);
>> 
>>        i.createCache(name).put(1L, 1L);
>> 
>>        assertEquals(1L, i.cache(name).get(1L));
>> 
>>        i.cluster().state(ClusterState.INACTIVE);
>>        i.cluster().state(ClusterState.ACTIVE);
>> 
>>        assertEquals(1L, i.cache(name).get(1L)); //Assertion error here!
>>    }
>> }
>> ```


Mime
View raw message