jdeppe-pivotal commented on a change in pull request #6117:
URL: https://github.com/apache/geode/pull/6117#discussion_r593466390
##########
File path:
geode-redis/src/main/java/org/apache/geode/redis/internal/RegionProvider.java
##########
@@ -51,4 +67,24 @@ public RegionProvider(InternalCache cache) {
public Region<String, Object> getConfigRegion() {
return configRegion;
}
+
+ /**
+ * Validates that the value passed in is a power of 2 and that it is not
greater than
+ * {@link #REDIS_SLOTS}
+ *
+ * @throws ManagementException if there is a problem with the value
+ */
+ protected static void validateBucketCount(int buckets) {
+ if (buckets <= 0 || ((buckets & (buckets - 1)) != 0)) {
+ throw new ManagementException(
+ String.format(
+ "Could not start Redis Server - System property '%s' must be a
power of 2. Configured value is invalid: %d",
Review comment:
I'll remove the restriction - it's going to be undocumented in any case
(at least for now).
----------------------------------------------------------------
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:
[email protected]