upthewaterspout commented on a change in pull request #150: URL: https://github.com/apache/geode-benchmarks/pull/150#discussion_r631931835
########## File path: geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/CreatePartitionedRegion.java ########## @@ -27,7 +33,14 @@ @Override public void run(TestContext context) throws Exception { - Cache cache = (Cache) context.getAttribute("SERVER_CACHE"); - cache.createRegionFactory(RegionShortcut.PARTITION_REDUNDANT).create("region"); + final Cache cache = (Cache) context.getAttribute(SERVER_CACHE); + final PartitionAttributes<?, ?> partitionAttributes = new PartitionAttributesFactory<>() + .setTotalNumBuckets(1 << 8) + .setRedundantCopies(1) + .create(); + final Region<?, ?> region = cache.createRegionFactory(RegionShortcut.PARTITION_REDUNDANT) + .setPartitionAttributes(partitionAttributes) + .create("region"); + PartitionRegionHelper.assignBucketsToPartitions(region); Review comment: Calling `assignBucketsToPartitions` in this task seems like it's going to potentially screw up the bucket balance. If each JVM calls CreatePartitionRegion in parallel, it's possible one JVM will finish first and get all of the buckets. `assignBucketsToPartitions` should probably be a separate step. ########## File path: geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/ExecuteFilteredFunction.java ########## @@ -55,13 +60,18 @@ public void setUp(BenchmarkConfiguration cfg) throws Exception { public boolean test(Map<Object, Object> ctx) { final Set<Long> filterSet = Collections.singleton(keyRange.random()); @SuppressWarnings("unchecked") - final ResultCollector<?, ?> resultCollector = FunctionService + final Object result = FunctionService .onRegion(region) .withFilter(filterSet) - .execute(function); - resultCollector.getResult(); - return true; + .execute(function) + .getResult(); + if (isValidationEnabled) { Review comment: Is it really worth an extra flag here to turn off validation? The cost of a null check and instanceof check seems inconsequential compared to a function execution, I think we could just always validate. ########## File path: geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/ExecuteFunction.java ########## @@ -41,7 +49,14 @@ public void setUp(BenchmarkConfiguration cfg) throws Exception { @Override public boolean test(final Map<Object, Object> ctx) { - FunctionService.onRegion(region).execute(BenchmarkFunction.class.getName()).getResult(); + final Object result = + FunctionService.onRegion(region).execute(BenchmarkFunction.class.getName()).getResult(); + + if (isValidationEnabled) { Review comment: Same validation question. -- 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