You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Bob Li <27...@qq.com> on 2017/08/16 02:48:05 UTC

Ignite2.1: Page eviction is not compatible with persistence when startup

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
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Ignite2.1: Page eviction is not compatible with persistence when startup

Posted by Denis Magda <dm...@apache.org>.
Here is the ticket: https://issues.apache.org/jira/browse/IGNITE-6115 <https://issues.apache.org/jira/browse/IGNITE-6115>

If anybody is interested go ahead and take over it.

—
Denis

> On Aug 17, 2017, at 5:16 PM, Dmitriy Setrakyan <ds...@apache.org> wrote:
> 
> Agree. If we remove the exception though, we need to make sure to print out
> the warning that the eviction policy will be ignored with Ignite native
> persistence enabled.
> 
> On Thu, Aug 17, 2017 at 1:35 PM, Denis Magda <dm...@apache.org> wrote:
> 
>> Dmitriy,
>> 
>>>> 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, any reason one approach is better than another?
>> 
>> The user doesn’t need to struggle with a bout of failures once he enable
>> the Ignite persistence. This specific user had the memory policy configured
>> before and once he enabled the disk he got extra exception he has to deal
>> with. It shouldn’t work this way.
>> 
>> In any case, the exception’s message doesn’t explain how to overcome the
>> issue and has to be improved:
>> 
>> Caused by: class org.apache.ignite.IgniteCheckedException: Page eviction
>> is
>> not compatible with persistence: 1G_Region
>> 
>> —
>> Denis


Re: Ignite2.1: Page eviction is not compatible with persistence when startup

Posted by Dmitriy Setrakyan <ds...@apache.org>.
Agree. If we remove the exception though, we need to make sure to print out
the warning that the eviction policy will be ignored with Ignite native
persistence enabled.

On Thu, Aug 17, 2017 at 1:35 PM, Denis Magda <dm...@apache.org> wrote:

> Dmitriy,
>
> >> 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, any reason one approach is better than another?
>
> The user doesn’t need to struggle with a bout of failures once he enable
> the Ignite persistence. This specific user had the memory policy configured
> before and once he enabled the disk he got extra exception he has to deal
> with. It shouldn’t work this way.
>
> In any case, the exception’s message doesn’t explain how to overcome the
> issue and has to be improved:
>
> Caused by: class org.apache.ignite.IgniteCheckedException: Page eviction
> is
> not compatible with persistence: 1G_Region
>
> —
> Denis

Re: Ignite2.1: Page eviction is not compatible with persistence when startup

Posted by Denis Magda <dm...@apache.org>.
Dmitriy,

>> 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, any reason one approach is better than another?

The user doesn’t need to struggle with a bout of failures once he enable the Ignite persistence. This specific user had the memory policy configured before and once he enabled the disk he got extra exception he has to deal with. It shouldn’t work this way. 

In any case, the exception’s message doesn’t explain how to overcome the issue and has to be improved:

Caused by: class org.apache.ignite.IgniteCheckedException: Page eviction is
not compatible with persistence: 1G_Region

—
Denis

Re: Ignite2.1: Page eviction is not compatible with persistence when startup

Posted by Denis Mekhanikov <dm...@gmail.com>.
At least documentation should be fixed to correspond to implementation.
Currently it says that eviction policy just have no effect when persistence
is enabled: https://apacheignite.readme.io/docs/evictions

чт, 17 авг. 2017 г. в 8:12, Dmitriy Setrakyan <ds...@apache.org>:

> On Wed, Aug 16, 2017 at 3:39 PM, Denis Magda <dm...@apache.org> wrote:
>
> > 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, any reason one approach is better than another?
>
>
> >
> > —
> > Denis
> >
> > > Begin forwarded message:
> > >
> > > From: Denis Mekhanikov <dm...@gmail.com>
> > > Subject: Re: Ignite2.1: Page eviction is not compatible with
> persistence
> > when startup
> > > Date: August 16, 2017 at 1:08:26 AM PDT
> > > To: user@ignite.apache.org
> > > Reply-To: user@ignite.apache.org
> > >
> > > 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 <2789106479@qq.com <mailto:
> > 2789106479@qq.com>>:
> > > 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(IgniteCacheDatabaseSharedManag
> > er.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.
> >
> >
>

Re: Ignite2.1: Page eviction is not compatible with persistence when startup

Posted by Dmitriy Setrakyan <ds...@apache.org>.
On Wed, Aug 16, 2017 at 3:39 PM, Denis Magda <dm...@apache.org> wrote:

> 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, any reason one approach is better than another?


>
> —
> Denis
>
> > Begin forwarded message:
> >
> > From: Denis Mekhanikov <dm...@gmail.com>
> > Subject: Re: Ignite2.1: Page eviction is not compatible with persistence
> when startup
> > Date: August 16, 2017 at 1:08:26 AM PDT
> > To: user@ignite.apache.org
> > Reply-To: user@ignite.apache.org
> >
> > 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 <2789106479@qq.com <mailto:
> 2789106479@qq.com>>:
> > 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(IgniteCacheDatabaseSharedManag
> er.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.
>
>

Fwd: Ignite2.1: Page eviction is not compatible with persistence when startup

Posted by Denis Magda <dm...@apache.org>.
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 <dm...@gmail.com>
> Subject: Re: Ignite2.1: Page eviction is not compatible with persistence when startup
> Date: August 16, 2017 at 1:08:26 AM PDT
> To: user@ignite.apache.org
> Reply-To: user@ignite.apache.org
> 
> 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 <2789106479@qq.com <ma...@qq.com>>:
> 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.


Re: Ignite2.1: Page eviction is not compatible with persistence when startup

Posted by Denis Magda <dm...@apache.org>.
> Eviction policy specifies the principle on which values will be evicted from cache to free up some space in RAM. On the other hand, persistence writes the oldest pages to the disk when RAM usage comes to a limit, so no values are removed from the cache.

I would emphasize that the data is written to disk *all the time* (appending to the WAL, checkpointing of dirty pages from RAM) and not when you run out of RAM space.

—
Denis
 
> On Aug 16, 2017, at 1:47 AM, Denis Mekhanikov <dm...@gmail.com> wrote:
> 
> But you wrote in the previous letter that you are trying to enable eviction policy and the node fails on such configuration.
> 
> Eviction policy and persistence cannot be enabled at the same time, because they solve the problem of memory lack in different ways. Eviction policy specifies the principle on which values will be evicted from cache to free up some space in RAM. On the other hand, persistence writes the oldest pages to the disk when RAM usage comes to a limit, so no values are removed from the cache.
> 
> So, you should decide either to use persistence or eviction policy, but not both of them.
> 
> ср, 16 авг. 2017 г. в 11:32, Bob Li <2789106479@qq.com <ma...@qq.com>>:
> Thank you for your response.
> 
> Basically, I just enabled persistence configuration without any eviction
> policy.
> 
>         <property name="persistentStoreConfiguration">
>             <bean
> class="org.apache.ignite.configuration.PersistentStoreConfiguration">
>             </bean>
>         </property>
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Ignite2-1-Page-eviction-is-not-compatible-with-persistence-when-startup-tp16215p16219.html <http://apache-ignite-users.70518.x6.nabble.com/Ignite2-1-Page-eviction-is-not-compatible-with-persistence-when-startup-tp16215p16219.html>
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Ignite2.1: Page eviction is not compatible with persistence when startup

Posted by Denis Mekhanikov <dm...@gmail.com>.
But you wrote in the previous letter that you are trying to enable eviction
policy and the node fails on such configuration.

Eviction policy and persistence cannot be enabled at the same time, because
they solve the problem of memory lack in different ways. Eviction policy
specifies the principle on which values will be evicted from cache to free
up some space in RAM. On the other hand, persistence writes the oldest
pages to the disk when RAM usage comes to a limit, so no values are removed
from the cache.

So, you should decide either to use persistence or eviction policy, but not
both of them.

ср, 16 авг. 2017 г. в 11:32, Bob Li <27...@qq.com>:

> Thank you for your response.
>
> Basically, I just enabled persistence configuration without any eviction
> policy.
>
>         <property name="persistentStoreConfiguration">
>             <bean
> class="org.apache.ignite.configuration.PersistentStoreConfiguration">
>             </bean>
>         </property>
>
>
>
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Ignite2-1-Page-eviction-is-not-compatible-with-persistence-when-startup-tp16215p16219.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: Ignite2.1: Page eviction is not compatible with persistence when startup

Posted by Bob Li <27...@qq.com>.
Thank you for your response.

Basically, I just enabled persistence configuration without any eviction
policy.

        <property name="persistentStoreConfiguration">
            <bean
class="org.apache.ignite.configuration.PersistentStoreConfiguration">
            </bean>
        </property>






--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Ignite2-1-Page-eviction-is-not-compatible-with-persistence-when-startup-tp16215p16219.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Ignite2.1: Page eviction is not compatible with persistence when startup

Posted by Denis Mekhanikov <dm...@gmail.com>.
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 <27...@qq.com>:

> 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
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>