Nikolay, This change will affect only the command-line utility, correct? No changes for the public API are planned?
чт, 30 янв. 2020 г. в 12:46, Nikolay Izhikov <nizhi...@apache.org>: > 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.goncha...@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 <nizhi...@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! > >> } > >> } > >> ``` > >