[ https://issues.apache.org/jira/browse/GEODE-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nick Vallely updated GEODE-3845: -------------------------------- Description: I use entry-idle-time and eviction together in a partition region that holds one redundant copy. Details of setting are as follows: {code:xml} <region name="Data" refid="PARTITION"> <region-attributes> <entry-idle-time> <expiration-attributes timeout="60" action="destroy" /> </entry-idle-time> <partition-attributes redundant-copies="1" /> <eviction-attributes> <lru-entry-count maximum="10" action="local-destroy" /> </eviction-attributes> </region-attributes> </region> {code} In this setting, the data held by the cache server is different. Then, inconsistent results are returned depending on the server to be connected. Eviction of the partition region can only select local-destroy or overflow-to-disk. On the other hand, it is written that the expire chapter of the document can not use local-destroy, local-invalidate in the partition region. Likewise, I think that data inconsistency will occur even with the settings like this time. Below is the test code: [https://github.com/masaki-yamakawa/geode/blob/bug-partition-local-destroy/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/BugExpireAndEvictionDUnitTest.java] I think that it is necessary to add a check at the time of region creation or write it in the document. ** Problem: currently eviction-action must be either 'local-destroy' or 'overflow-to-disk' ex: <expiration-attributes timeout="60" action="local-destroy" /> Solution: This story is to add the additional option "distributed-destroy" as an action setting for expiration-attributes. This will enable a local destroy action to be distributed across the cluster (currently this does not exist) Acceptance: can set this on region configuration via cache.xml, API or gfsh gfsh help and docs have been updated +Story: Add Option+ Given I want data consistency across a distributed replicated region When I go to set an eviction action Then I should have the ability to specify one of the following actions: * 'local-destroy' [Default action] * 'none' * 'overflow-to-disk' * 'distributed-destroy' (NEW option) +Story: Behavior+ Given I have a region expiration action set in the system to 'distributed-destroy' When an eviction event based on [mem%, count, regionSize, time] occurs to destroy entries Then the system will destroy the same entries in any region where they exist across the distributed environment +Story: Configuring cache.xml+ Given I am configuring a system with replicated regions When I setup my cache.xml Then I have the ability to add a 'destributed–destroy' action value for the following tags: * <expiration-attributes timeout="60" action="XXXXX" /> * <lru-entry-count maximum="10000" action "XXXXX" /> +Story: Spring Data Gemfire+ Given I am configuring a system with replicated regions when I setup my region's eviction action through Spring Data Gemfire Then I need the ability to specify the value of 'distributed-destroy' +Story : Documentation+ Given I am looking for help for region configuration When I look at the help documentation for 'Configure Data Eviction' Then I should see details under the 'Decide what action to take when the limit is reached' section for 'Distributed Destroy' +Story: GFSH Create region+ GIVEN I want to create a new region with distributed-destroy eviction-action through GFSH CLI WHEN I use the command {code:java} create region{code} THEN I have the optional parameter of {code:java} --eviction-action=distributed-destroy{code} AND the API utilized by GFSH is updated to support this value for create region was: I use entry-idle-time and eviction together in a partition region that holds one redundant copy. Details of setting are as follows: {code:xml} <region name="Data" refid="PARTITION"> <region-attributes> <entry-idle-time> <expiration-attributes timeout="60" action="destroy" /> </entry-idle-time> <partition-attributes redundant-copies="1" /> <eviction-attributes> <lru-entry-count maximum="10" action="local-destroy" /> </eviction-attributes> </region-attributes> </region> {code} In this setting, the data held by the cache server is different. Then, inconsistent results are returned depending on the server to be connected. Eviction of the partition region can only select local-destroy or overflow-to-disk. On the other hand, it is written that the expire chapter of the document can not use local-destroy, local-invalidate in the partition region. Likewise, I think that data inconsistency will occur even with the settings like this time. Below is the test code: [https://github.com/masaki-yamakawa/geode/blob/bug-partition-local-destroy/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/BugExpireAndEvictionDUnitTest.java] I think that it is necessary to add a check at the time of region creation or write it in the document. ** Problem: currently eviction-action must be either 'local-destroy' or 'overflow-to-disk' ex: <expiration-attributes timeout="60" action="local-destroy" /> Solution: This story is to add the additional option "distributed-destroy" as an action setting for expiration-attributes. This will enable a local destroy action to be distributed across the cluster (currently this does not exist) Acceptance: can set this on region configuration via cache.xml, API or gfsh gfsh help and docs have been updated +Story: Add Option+ Given I want data consistency across a distributed replicated region When I go to set an eviction action Then I should have the ability to specify one of the following actions: * 'local-destroy' [Default action] * 'none' * 'overflow-to-disk' * 'distributed-destroy' (NEW option) +Story: Behavior+ Given I have a region expiration action set in the system to 'distributed-destroy' When an eviction event based on [mem%, count, regionSize, time] occurs to destroy entries Then the system will destroy the same entries in any region where they exist across the distributed environment +Story: Configuring cache.xml+ Given I am configuring a system with replicated regions When I setup my cache.xml Then I have the ability to add a 'destributed–destroy' action value for the following tags: * <expiration-attributes timeout="60" action="XXXXX" /> * <lru-entry-count maximum="10000" action "XXXXX" /> +Story: Spring Data Gemfire+ Given I am configuring a system with replicated regions when I setup my region's eviction action through Spring Data Gemfire Then I need the ability to specify the value of 'distributed-destroy' +Story : Documentation+ Given I am looking for help for region configuration When I look at the help documentation for 'Configure Data Eviction' Then I should see details under the 'Decide what action to take when the limit is reached' section for 'Distributed Destroy' +Story: GFSH Create region+ GIVEN I want to create a new region with distributed-destroy eviction-action through GFSH CLI WHEN I use the command {code:java} create region{code} THEN I have the optional parameter of {code:java} --eviction-action=distributed-destroy{code} AND the API utilized by GFSH is updated to support this value for create region Open questions? +Story:+ Mutable Region * Should we support modification of region? +Story:+ Create replicated region one with local-destroy and one with distributed-destroy, is this possible? +Story: Region-wide override+ Given I want to create an customExpire class to override existing region expiration actions When I create a custom expiration class that implements 'org.apache.geode.cache.CustomExpiry' documented [here|https://gemfire.docs.pivotal.io/95/geode/developing/expiration/configuring_data_expiration.html] Then I can use the 'DISTRIBUTED-DESTROY' expiration action {code:java} private static final ExpirationAttribute CUSTOM_EXPIRY = new ExpirationAttributes(10, ExpirationAction.DISTRIBUTED_DESTROY);{code} > As a user, I want to be able to do a distributed destroy action from a local > region > ----------------------------------------------------------------------------------- > > Key: GEODE-3845 > URL: https://issues.apache.org/jira/browse/GEODE-3845 > Project: Geode > Issue Type: New Feature > Components: docs, eviction > Reporter: Masaki Yamakawa > Priority: Major > > I use entry-idle-time and eviction together in a partition region that holds > one redundant copy. > Details of setting are as follows: > {code:xml} > <region name="Data" refid="PARTITION"> > <region-attributes> > <entry-idle-time> > <expiration-attributes timeout="60" action="destroy" /> > </entry-idle-time> > <partition-attributes redundant-copies="1" /> > <eviction-attributes> > <lru-entry-count maximum="10" action="local-destroy" /> > </eviction-attributes> > </region-attributes> > </region> > {code} > In this setting, the data held by the cache server is different. Then, > inconsistent results are returned depending on the server to be connected. > Eviction of the partition region can only select local-destroy or > overflow-to-disk. On the other hand, it is written that the expire chapter of > the document can not use local-destroy, local-invalidate in the partition > region. Likewise, I think that data inconsistency will occur even with the > settings like this time. > Below is the test code: > [https://github.com/masaki-yamakawa/geode/blob/bug-partition-local-destroy/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/BugExpireAndEvictionDUnitTest.java] > I think that it is necessary to add a check at the time of region creation or > write it in the document. > > ** > Problem: currently eviction-action must be either 'local-destroy' or > 'overflow-to-disk' > ex: <expiration-attributes timeout="60" action="local-destroy" /> > Solution: This story is to add the additional option "distributed-destroy" as > an action setting for expiration-attributes. > This will enable a local destroy action to be distributed across the cluster > (currently this does not exist) > > Acceptance: can set this on region configuration via cache.xml, API or gfsh > gfsh help and docs have been updated > > +Story: Add Option+ > Given I want data consistency across a distributed replicated region > When I go to set an eviction action > Then I should have the ability to specify one of the following actions: > * 'local-destroy' [Default action] > * 'none' > * 'overflow-to-disk' > * 'distributed-destroy' (NEW option) > > +Story: Behavior+ > > Given I have a region expiration action set in the system to > 'distributed-destroy' > When an eviction event based on [mem%, count, regionSize, time] occurs to > destroy entries > Then the system will destroy the same entries in any region where they exist > across the distributed environment > > +Story: Configuring cache.xml+ > Given I am configuring a system with replicated regions > When I setup my cache.xml > Then I have the ability to add a 'destributed–destroy' action value for the > following tags: > * <expiration-attributes timeout="60" action="XXXXX" /> > * <lru-entry-count maximum="10000" action "XXXXX" /> > > > +Story: Spring Data Gemfire+ > Given I am configuring a system with replicated regions > when I setup my region's eviction action through Spring Data Gemfire > Then I need the ability to specify the value of 'distributed-destroy' > > +Story : Documentation+ > Given I am looking for help for region configuration > When I look at the help documentation for 'Configure Data Eviction' > Then I should see details under the 'Decide what action to take when the > limit is reached' section for 'Distributed Destroy' > > +Story: GFSH Create region+ > GIVEN I want to create a new region with distributed-destroy eviction-action > through GFSH CLI > WHEN I use the command > {code:java} > create region{code} > THEN I have the optional parameter of > {code:java} > --eviction-action=distributed-destroy{code} > AND the API utilized by GFSH is updated to support this value for create > region > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)