diff --git a/README.adoc b/README.adoc index 2a6ced6..97110ee 100644 --- a/README.adoc +++ b/README.adoc @@ -125,7 +125,6 @@ Rule To Scale Redis up 3 GB: == Limitations * The Redis Cloud Autoscaler is currently only available for Redis Cloud Pro Subscriptions -* The Redis Cloud Autoscaler will currently only operate on Subscriptions with as single database * The Redis Cloud Autoscaler will currently only scale a database in (down) deterministically (`Deterministic` is the only valid setting for `DecreaseMemory` and `DecreaseThroughput`) == Availability diff --git a/autoscaler/redis-cloud-autoscaler/src/main/java/com/redis/autoscaler/services/RedisCloudDatabaseService.java b/autoscaler/redis-cloud-autoscaler/src/main/java/com/redis/autoscaler/services/RedisCloudDatabaseService.java index f00ac43..55692fe 100644 --- a/autoscaler/redis-cloud-autoscaler/src/main/java/com/redis/autoscaler/services/RedisCloudDatabaseService.java +++ b/autoscaler/redis-cloud-autoscaler/src/main/java/com/redis/autoscaler/services/RedisCloudDatabaseService.java @@ -129,12 +129,6 @@ public Optional applyRule(Rule rule) throws IOException, InterruptedExcept RedisCloudDatabase db = dbOpt.get(); - int numDatabases = getDatabaseCount(); - if(numDatabases > 1){ - LOG.warn("Database count for subscription {} is greater than 1, using autoscaler is not supported, skipping rule: {}", config.getSubscriptionId(), rule); - return Optional.empty(); - } - ScaleRequest scaleRequest; switch (rule.getRuleType()){ diff --git a/autoscaler/redis-cloud-autoscaler/src/test/java/com/redis/autoscaler/RedisCloudDatabaseServiceTests.java b/autoscaler/redis-cloud-autoscaler/src/test/java/com/redis/autoscaler/RedisCloudDatabaseServiceTests.java index a4245ec..5c81eb6 100644 --- a/autoscaler/redis-cloud-autoscaler/src/test/java/com/redis/autoscaler/RedisCloudDatabaseServiceTests.java +++ b/autoscaler/redis-cloud-autoscaler/src/test/java/com/redis/autoscaler/RedisCloudDatabaseServiceTests.java @@ -147,7 +147,6 @@ void testScaleDatabaseCRDBMemory() throws Exception { // Set up the sequence of responses when(httpClient.send(any(), any())) .thenReturn(httpResponse) // First call - get database - .thenReturn(countResponse) // Second call - get database count .thenReturn(scaleResponse); // Third call - scale database // Execute the rule @@ -207,9 +206,8 @@ void testScaleDatabaseCRDBThroughput() throws Exception { // Set up the sequence of responses when(httpClient.send(any(), any())) .thenReturn(httpResponse) // First call - get database - .thenReturn(countResponse) // Second call - get database count .thenReturn(scaleResponse); // Third call - scale database - + // Execute the rule Optional taskOpt = service.applyRule(rule); @@ -274,7 +272,6 @@ void testRoundUpToNearestTenth() throws Exception { // Set up the sequence of responses when(httpClient.send(any(), any())) .thenReturn(httpResponse) // First call - get database - .thenReturn(countResponse) // Second call - get database count .thenReturn(scaleResponse); // Third call - scale database // Execute the rule @@ -332,7 +329,6 @@ void testRoundUpToNearest500() { // Set up the sequence of responses when(httpClient.send(any(), any())) .thenReturn(httpResponse) // First call - get database - .thenReturn(countResponse) // Second call - get database count .thenReturn(scaleResponse); // Third call - scale database // Execute the rule