[ https://issues.apache.org/jira/browse/GEODE-7678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17098598#comment-17098598 ]
ASF GitHub Bot commented on GEODE-7678: --------------------------------------- agingade commented on a change in pull request #4987: URL: https://github.com/apache/geode/pull/4987#discussion_r419173757 ########## File path: geode-core/src/main/java/org/apache/geode/internal/cache/InternalRegion.java ########## @@ -459,4 +459,7 @@ VersionedObjectList basicRemoveAll(Collection<Object> keys, * @return true if synchronization should be attempted */ boolean shouldSyncForCrashedMember(InternalDistributedMember id); + + void clearRegionLocally(RegionEventImpl regionEvent, boolean cacheWrite, Review comment: Not sure, what you meant here...InternalRegion is an interface and I added method in that to have access of it in the implemented classes. ########## File path: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java ########## @@ -30,18 +31,22 @@ import org.apache.geode.internal.cache.versions.RegionVersionVector; import org.apache.geode.logging.internal.log4j.api.LogService; -public class ClearPartitionedRegion { +public class PartitionedRegionClear { private static final Logger logger = LogService.getLogger(); + private static final String CLEAR_OPERATION = "_clearOperation"; + + private final int retryTime = 2 * 60 * 1000 /* partitionedRegion.getRetryTimeout() */; Review comment: Gester, This is the timeout used to wait for secondary buckets to become primary...Looking at the code and the test failures i have seen, its indeterministic and there is no easy way to wait and notify on this action. ########## File path: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java ########## @@ -30,18 +31,22 @@ import org.apache.geode.internal.cache.versions.RegionVersionVector; import org.apache.geode.logging.internal.log4j.api.LogService; -public class ClearPartitionedRegion { +public class PartitionedRegionClear { private static final Logger logger = LogService.getLogger(); + private static final String CLEAR_OPERATION = "_clearOperation"; + + private final int retryTime = 2 * 60 * 1000 /* partitionedRegion.getRetryTimeout() */; Review comment: The "partitionedRegion.getRetryTimeout()" is an hour long. In clear operation case, it doesn't make sense to wait for so long. Instead we throw partial clear exception and letting user to handle that. ########## File path: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java ########## @@ -30,18 +31,22 @@ import org.apache.geode.internal.cache.versions.RegionVersionVector; import org.apache.geode.logging.internal.log4j.api.LogService; -public class ClearPartitionedRegion { +public class PartitionedRegionClear { private static final Logger logger = LogService.getLogger(); + private static final String CLEAR_OPERATION = "_clearOperation"; + + private final int retryTime = 2 * 60 * 1000 /* partitionedRegion.getRetryTimeout() */; Review comment: @DonalEvans Also, adding system property, it doesn't look like it will be of any help to application and I am not convinced that this needs a system property. In this case if we are unable to find Primary bucket getting elected in a given time we are throwing partial clear exception; based on which user can take further action, like retry. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Partitioned Region clear operations must invoke cache level listeners > --------------------------------------------------------------------- > > Key: GEODE-7678 > URL: https://issues.apache.org/jira/browse/GEODE-7678 > Project: Geode > Issue Type: Sub-task > Components: regions > Reporter: Nabarun Nag > Priority: Major > Labels: GeodeCommons > > Clear operations are successful and CacheListener.afterRegionClear(), > CacheWriter.beforeRegionClear() are invoked. > > Acceptance : > * DUnit tests validating the above behavior. > * Test coverage to when a member departs in this scenario > * Test coverage to when a member restarts in this scenario > * Unit tests with complete code coverage for the newly written code. > -- This message was sent by Atlassian Jira (v8.3.4#803005)