Developers,

Let me bring this to your attention. Why do we throw an exception if the user 
has both an eviction policy and the Ignite persistence configured? Why don’t we 
simply ignore the eviction policy printing a warning and proceed with the node 
startup?

—
Denis

> Begin forwarded message:
> 
> From: Denis Mekhanikov <[email protected]>
> Subject: Re: Ignite2.1: Page eviction is not compatible with persistence when 
> startup
> Date: August 16, 2017 at 1:08:26 AM PDT
> To: [email protected]
> Reply-To: [email protected]
> 
> Looks like you configured both persistence and eviction policy. These are 
> alternative options and cannot be enabled at the same time.
> 
> ср, 16 авг. 2017 г. в 5:48, Bob Li <[email protected] 
> <mailto:[email protected]>>:
> I want to setup the eviction like:
> 
>     <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
>         <property name="name" value="1G_Region" />
>         <property name="initialSize" value="#{1024 * 1024 * 1024}" />
>         <property name="pageEvictionMode" value="RANDOM_LRU" />
>    </bean>
> 
> but when it startups,  encountered the following:
> 
> [2017-08-16 10:28:08,950][ERROR][main][IgniteKernal] Exception during start
> processors, node will be stopped and close connections
> class org.apache.ignite.IgniteCheckedException: Failed to start processor:
> GridProcessorAdapter []
>         at
> org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1791)
>         at
> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:929)
>         at
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1896)
>         at
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1648)
>         at
> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1076)
>         at
> org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:994)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:880)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:779)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:649)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:618)
>         at org.apache.ignite.Ignition.start(Ignition.java:347)
>         at
> org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:302)
> Caused by: class org.apache.ignite.IgniteCheckedException: Page eviction is
> not compatible with persistence: 1G_Region
>         at
> org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.checkPolicyEvictionProperties(GridCacheDatabaseSharedManager.java:660)
>         at
> org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager.validateConfiguration(IgniteCacheDatabaseSharedManager.java:336)
>         at
> org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager.start0(IgniteCacheDatabaseSharedManager.java:109)
>         at
> org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.start0(GridCacheDatabaseSharedManager.java:358)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter.start(GridCacheSharedManagerAdapter.java:61)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.start(GridCacheProcessor.java:696)
>         at
> org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1788)
> 
> From the above,   it seemed those codes worked in the file
> 'GridCacheDatabaseSharedManager':
> 
>     @Override protected void
> checkPolicyEvictionProperties(MemoryPolicyConfiguration plcCfg,
> MemoryConfiguration dbCfg)
>         throws IgniteCheckedException {
>         if (plcCfg.getPageEvictionMode() != DataPageEvictionMode.DISABLED)
>             throw new IgniteCheckedException("Page eviction is not
> compatible with persistence: " + plcCfg.getName());
>     }
> 
> 
> how to solve it? thanks.
> 
> 
> 
> --
> View this message in context: 
> http://apache-ignite-users.70518.x6.nabble.com/Ignite2-1-Page-eviction-is-not-compatible-with-persistence-when-startup-tp16215.html
>  
> <http://apache-ignite-users.70518.x6.nabble.com/Ignite2-1-Page-eviction-is-not-compatible-with-persistence-when-startup-tp16215.html>
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to