BenjaminPerryRoss commented on a change in pull request #4818: URL: https://github.com/apache/geode/pull/4818#discussion_r412472330
########## File path: geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/functions/DataCommandFunction.java ########## @@ -314,17 +314,13 @@ public DataCommandResult remove(String key, String keyClass, String regionName, } } else { DataPolicy policy = region.getAttributes().getDataPolicy(); - if (!policy.withPartitioning()) { - region.clear(); - if (logger.isDebugEnabled()) { - logger.debug("Cleared all keys in the region - {}", regionName); - } - return DataCommandResult.createRemoveInfoResult(key, null, null, - CliStrings.format(CliStrings.REMOVE__MSG__CLEARED_ALL_CLEARS, regionName), true); - } else { - return DataCommandResult.createRemoveInfoResult(key, null, null, - CliStrings.REMOVE__MSG__CLEARALL_NOT_SUPPORTED_FOR_PARTITIONREGION, false); + region.clear(); Review comment: I agree this could be confusing. I've added clear() as a helper method invoked by remove() when called with the 'ALL' flag to help make the relationship more visible. ---------------------------------------------------------------- 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