pivotal-jbarrett commented on code in PR #7424: URL: https://github.com/apache/geode/pull/7424#discussion_r859083195
########## geode-wan/src/main/java/org/apache/geode/cache/wan/internal/WanCopyRegionFunctionService.java: ########## @@ -41,11 +44,18 @@ public class WanCopyRegionFunctionService implements CacheService { @Override public boolean init(Cache cache) { + int maxConcurrentThreads = SystemProperty + .getProductIntegerProperty( + SystemPropertyHelper.WAN_COPY_REGION_MAX_CONCURRENT_THREADS, 10); + return init(maxConcurrentThreads); + } + + @VisibleForTesting + boolean init(int maxConcurrentThreads) { String WAN_COPY_REGION_FUNCTION_EXECUTION_PROCESSOR_THREAD_PREFIX = Review Comment: Why is this not a constant member variable? ########## geode-wan/src/test/java/org/apache/geode/cache/wan/internal/WanCopyRegionFunctionServiceTest.java: ########## @@ -23,6 +23,7 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; import org.junit.Before; import org.junit.Test; Review Comment: Please upgrade to JUnit 5. ########## geode-core/src/main/java/org/apache/geode/internal/lang/SystemPropertyHelper.java: ########## @@ -113,6 +113,14 @@ public class SystemPropertyHelper { */ public static final String RE_AUTHENTICATE_WAIT_TIME = "reauthenticate.wait.time"; + /** + * Maximum number of concurrent executions in a server of wan-copy region commands. + * Once the maximum number is reached, subsequent executions will be halted until + * a thread for any of the ongoing executions is released. + */ + public static final String WAN_COPY_REGION_MAX_CONCURRENT_THREADS = + "geode.wan.copy-region.max-threads"; Review Comment: Raised this concern in another PR about the ongoing inconsistency in naming conventions for system properties. I don't have a good answer, just raising this again. ########## geode-wan/src/main/java/org/apache/geode/cache/wan/internal/WanCopyRegionFunctionService.java: ########## @@ -41,11 +44,18 @@ public class WanCopyRegionFunctionService implements CacheService { @Override public boolean init(Cache cache) { + int maxConcurrentThreads = SystemProperty + .getProductIntegerProperty( + SystemPropertyHelper.WAN_COPY_REGION_MAX_CONCURRENT_THREADS, 10); + return init(maxConcurrentThreads); + } + + @VisibleForTesting Review Comment: As a practice we aren't adding this annotation to package private methods used in testing. -- 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. To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org