[geode] branch develop updated (3b133c3 -> 310c647)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 3b133c3 GEODE-9882: User Guide, Micrometer section, fix product_name typo (#7181) add 310c647 GEODE-9877: Use ServerSocket to create interfering port (#7180) No new revisions were added by this update. Summary of changes: ...pDUnitTest.java => GeodeRedisServerStartupAcceptanceTest.java} | 7 --- ...t.java => GeodeRedisServerStartupUsingGfshAcceptanceTest.java} | 8 2 files changed, 8 insertions(+), 7 deletions(-) rename geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/{GeodeRedisServerStartupDUnitTest.java => GeodeRedisServerStartupAcceptanceTest.java} (98%) rename geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/{GeodeRedisServerStartUpAcceptanceTest.java => GeodeRedisServerStartupUsingGfshAcceptanceTest.java} (93%)
[geode] branch support/1.14 updated: GEODE-9877: Use ServerSocket to create interfering port (#7182)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch support/1.14 in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/support/1.14 by this push: new e3ab8ca GEODE-9877: Use ServerSocket to create interfering port (#7182) e3ab8ca is described below commit e3ab8cae9bbf4518416bef4ecba99792bfc25224 Author: Jens Deppe AuthorDate: Sat Dec 11 22:39:41 2021 -0800 GEODE-9877: Use ServerSocket to create interfering port (#7182) - This is a manual backport of 310c647da6 since there are a lot of conflicts when cherry picking and the fix is quite trivial.
[geode] branch develop updated (9359388 -> da16195)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 9359388 GEODE-9148: prevent expiration reschedules (#6514) add da16195 GEODE-9899: Fix synchronization for RedisSet (#7201) No new revisions were added by this update. Summary of changes: .../apache/geode/redis/internal/data/RedisSet.java | 10 ++-- .../geode/redis/internal/data/RedisSetTest.java| 70 ++ 2 files changed, 75 insertions(+), 5 deletions(-)
[geode] branch develop updated (3b2595a -> 0aced7f)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 3b2595a GEODE-9850: resolve the flaky test in getting the oldest tombstone (#7198) add 0aced7f GEODE-9810: More robust waiting for native Redis cluster to start (#7192) No new revisions were added by this update. Summary of changes: .../apache/geode/redis/NativeRedisClusterTest.java | 41 --- .../java/org/apache/geode/redis/ClusterNodes.java | 5 +-- .../geode/redis/NativeRedisClusterTestRule.java| 46 +- 3 files changed, 74 insertions(+), 18 deletions(-)
[geode] branch develop updated (87b1007 -> 5c76706)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 87b1007 Revert "GEODE-9854: Orphaned .drf file causing memory leak (#7145)" (#7209) add 5c76706 GEODE-9912: Add unique identifier to DUnit log lines (#7232) No new revisions were added by this update. Summary of changes: .../java/org/apache/geode/test/dunit/internal/ProcessManager.java | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)
[geode] branch develop updated (5c76706 -> 237d3ac)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 5c76706 GEODE-9912: Add unique identifier to DUnit log lines (#7232) add 237d3ac GEODE-9911: Allow ExecutorServiceRule to name threads (#7231) No new revisions were added by this update. Summary of changes: .../test/junit/rules/ExecutorServiceRule.java | 35 ++ 1 file changed, 29 insertions(+), 6 deletions(-)
[geode] branch develop updated (237d3ac -> 68f074d)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 237d3ac GEODE-9911: Allow ExecutorServiceRule to name threads (#7231) add 68f074d Enable tests again (#7233) No new revisions were added by this update. Summary of changes: .../executor/hash/HashesAndCrashesDUnitTest.java | 260 +++-- 1 file changed, 136 insertions(+), 124 deletions(-)
[geode] branch develop updated (97601eb -> f23c23d)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 97601eb GEODE-9819: fix durable client socket leak add f23c23d GEODE-9691: Fix flaky ZRemDUnitTest (#7239) No new revisions were added by this update. Summary of changes: .../commands/executor/sortedset/ZRemDUnitTest.java | 73 +++--- 1 file changed, 50 insertions(+), 23 deletions(-)
[geode] branch develop updated (2b03244 -> 93fdccc)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 2b03244 GEODE-9944: Handle a race when HARegionQueue is not initialized yet. (#7259) add 93fdccc GEODE-9937: Add convenience methods to FileWatchingX509Extended*Manager (#7251) No new revisions were added by this update. Summary of changes: .../FileWatchingX509ExtendedKeyManager.java| 24 -- .../FileWatchingX509ExtendedTrustManager.java | 24 -- 2 files changed, 36 insertions(+), 12 deletions(-)
[geode] branch develop updated (7978abf -> 6b20445)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 7978abf GEODE-9758: Add internal serial filter API (#7217) add 6b20445 GEODE-9962: Update redis INFO command for cluster mode responses (#7273) No new revisions were added by this update. Summary of changes: .../executor/server/InfoNativeRedisAcceptanceTest.java | 6 +++--- .../executor/server/AbstractInfoIntegrationTest.java | 14 +++--- .../commands/executor/server/InfoIntegrationTest.java | 2 +- .../internal/commands/executor/server/InfoExecutor.java| 6 +++--- 4 files changed, 18 insertions(+), 10 deletions(-)
[geode] branch develop updated (a2ed241 -> a53c6da)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from a2ed241 add 1.13.7 to old versions on develop (#7292) add a53c6da GEODE-9834: SRANDMEMBER Command Support (#7228) No new revisions were added by this update. Summary of changes: .../tools_modules/geode_for_redis.html.md.erb | 1 + geode-for-redis/README.md | 1 + ...a => SRandMemberNativeRedisAcceptanceTest.java} | 2 +- .../server/AbstractHitsMissesIntegrationTest.java | 10 +- .../set/AbstractSRandMemberIntegrationTest.java| 165 + .../executor/set/AbstractSetsIntegrationTest.java | 49 -- ...onTest.java => SRandMemberIntegrationTest.java} | 2 +- .../redis/internal/commands/RedisCommandType.java | 4 +- .../commands/executor/set/SRandMemberExecutor.java | 50 +-- ...dMemberExecutor.java => SetRandomExecutor.java} | 52 --- .../geode/redis/internal/data/NullRedisSet.java| 2 +- .../apache/geode/redis/internal/data/RedisSet.java | 85 ++- .../SizeableObjectOpenCustomHashSet.java | 8 + 13 files changed, 269 insertions(+), 162 deletions(-) copy geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/{SCardNativeRedisAcceptanceTest.java => SRandMemberNativeRedisAcceptanceTest.java} (92%) create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSRandMemberIntegrationTest.java copy geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/{SCardIntegrationTest.java => SRandMemberIntegrationTest.java} (92%) copy geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/{SRandMemberExecutor.java => SetRandomExecutor.java} (59%) mode change 100755 => 100644
[geode] branch develop updated: GEODE-9958: Add gfsh-specific tests for Radish startup (#7297)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 7794553 GEODE-9958: Add gfsh-specific tests for Radish startup (#7297) 7794553 is described below commit 77945531fafd566a0cbca7d05b5347b8ea299efc Author: Jens Deppe AuthorDate: Fri Jan 21 19:57:42 2022 -0800 GEODE-9958: Add gfsh-specific tests for Radish startup (#7297) --- .../GeodeRedisServerStartupAcceptanceTest.java | 5 -- ...eRedisServerStartupUsingGfshAcceptanceTest.java | 65 ++ 2 files changed, 65 insertions(+), 5 deletions(-) diff --git a/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/GeodeRedisServerStartupAcceptanceTest.java b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/GeodeRedisServerStartupAcceptanceTest.java index f16214c..523e63c 100644 --- a/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/GeodeRedisServerStartupAcceptanceTest.java +++ b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/GeodeRedisServerStartupAcceptanceTest.java @@ -28,7 +28,6 @@ import java.net.BindException; import java.net.InetSocketAddress; import java.net.ServerSocket; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -43,16 +42,12 @@ import org.apache.geode.test.dunit.rules.ClusterStartupRule; import org.apache.geode.test.dunit.rules.MemberVM; import org.apache.geode.test.dunit.rules.RedisClusterStartupRule; import org.apache.geode.test.junit.categories.IgnoreInRepeatTestTasks; -import org.apache.geode.test.junit.rules.GfshCommandRule; public class GeodeRedisServerStartupAcceptanceTest { @Rule public RedisClusterStartupRule cluster = new RedisClusterStartupRule(); - @ClassRule - public static GfshCommandRule gfsh = new GfshCommandRule(); - @Category(IgnoreInRepeatTestTasks.class) @Test public void startupOnDefaultPort() { diff --git a/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/GeodeRedisServerStartupUsingGfshAcceptanceTest.java b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/GeodeRedisServerStartupUsingGfshAcceptanceTest.java index 5827ccb..6ce72a5 100644 --- a/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/GeodeRedisServerStartupUsingGfshAcceptanceTest.java +++ b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/GeodeRedisServerStartupUsingGfshAcceptanceTest.java @@ -15,7 +15,9 @@ package org.apache.geode.redis.internal.commands.executor; +import static org.apache.geode.test.dunit.rules.RedisClusterStartupRule.BIND_ADDRESS; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import java.io.IOException; import java.net.InetSocketAddress; @@ -23,8 +25,12 @@ import java.net.ServerSocket; import org.junit.Rule; import org.junit.Test; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.exceptions.JedisConnectionException; +import org.apache.geode.distributed.ConfigurationProperties; import org.apache.geode.internal.AvailablePortHelper; +import org.apache.geode.internal.inet.LocalHostUtil; import org.apache.geode.test.junit.rules.gfsh.GfshExecution; import org.apache.geode.test.junit.rules.gfsh.GfshRule; import org.apache.geode.test.junit.rules.gfsh.GfshScript; @@ -99,4 +105,63 @@ public class GeodeRedisServerStartupUsingGfshAcceptanceTest { assertThat(execution.getOutputText()).containsIgnoringCase( "The geode-for-redis-bind-address 1.1.1.1 is not a valid address for this machine"); } + + @Test + public void gfshStartsRedisServer_whenRedisEnabled() { +String command = +"start server --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_ENABLED + "=true"; +gfshRule.execute(command); + +try (Jedis jedis = new Jedis(BIND_ADDRESS, 6379)) { + assertThat(jedis.ping()).isEqualTo("PONG"); +} + } + + @Test + public void gfshStartsRedisServer_whenCustomPort() { +int port = AvailablePortHelper.getRandomAvailableTCPPort(); +String command = +"start server --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_ENABLED + "=true" ++ " --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_PORT + "=" + port; + +gfshRule.execute(command); + +try (Jedis jedis = new Jedis(BIND_ADDRESS, port)) { + assertThat(jedis.ping()).isEqualTo("PONG"); +} + } + + @Test + public void gfshStartsRedisServer_whenCustomPortAndBindAddress() { +int port = AvailablePortHelper.getRandomAvailableTCPPort(); +
[geode] branch feature/redis-lists-interview created (now bd96ca2)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch feature/redis-lists-interview in repository https://gitbox.apache.org/repos/asf/geode.git. at bd96ca2 Initial commit This branch includes the following new commits: new bd96ca2 Initial commit The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[geode] 01/01: Initial commit
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch feature/redis-lists-interview in repository https://gitbox.apache.org/repos/asf/geode.git commit bd96ca2d5f60946279c63690b6892c08ae7ca713 Author: Jens Deppe AuthorDate: Tue Jan 25 06:47:22 2022 -0800 Initial commit --- .../list/RedisListNativeRedisAcceptanceTest.java} | 30 +++--- .../list/AbstractRedisListIntegrationTest.java | 46 +++ .../executor/list/RedisListIntegrationTest.java} | 22 --- .../geode/redis/internal/GeodeRedisService.java| 2 + .../redis/internal/commands/RedisCommandType.java | 9 +++ .../commands/executor/list/LLenExecutor.java | 38 .../commands/executor/list/LPopExecutor.java | 43 ++ .../commands/executor/list/LPushExecutor.java | 42 + .../internal/data/NullRedisDataStructures.java | 1 + ...RedisDataStructures.java => NullRedisList.java} | 18 -- .../geode/redis/internal/data/RedisDataType.java | 2 + .../geode/redis/internal/data/RedisList.java | 68 ++ .../internal/netty/ExecutionHandlerContext.java| 11 +++- .../serialization/DataSerializableFixedID.java | 1 + 14 files changed, 311 insertions(+), 22 deletions(-) diff --git a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisDataStructures.java b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/list/RedisListNativeRedisAcceptanceTest.java similarity index 61% copy from geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisDataStructures.java copy to geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/list/RedisListNativeRedisAcceptanceTest.java index e0e750e..9de54ea 100644 --- a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisDataStructures.java +++ b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/list/RedisListNativeRedisAcceptanceTest.java @@ -12,12 +12,26 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.geode.redis.internal.data; - -public class NullRedisDataStructures { - public static final NullRedisString NULL_REDIS_STRING = new NullRedisString(); - public static final NullRedisSet NULL_REDIS_SET = new NullRedisSet(); - public static final NullRedisSortedSet NULL_REDIS_SORTED_SET = new NullRedisSortedSet(); - public static final NullRedisHash NULL_REDIS_HASH = new NullRedisHash(); - public static final NullRedisData NULL_REDIS_DATA = new NullRedisData(); +package org.apache.geode.redis.internal.commands.executor.list; + + +import org.junit.ClassRule; + +import org.apache.geode.redis.NativeRedisClusterTestRule; + +public class RedisListNativeRedisAcceptanceTest extends AbstractRedisListIntegrationTest { + + @ClassRule + public static NativeRedisClusterTestRule redis = new NativeRedisClusterTestRule(); + + @Override + public int getPort() { +return redis.getExposedPorts().get(0); + } + + @Override + public void flushAll() { +redis.flushAll(); + } + } diff --git a/geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/AbstractRedisListIntegrationTest.java b/geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/AbstractRedisListIntegrationTest.java new file mode 100644 index 000..446016f --- /dev/null +++ b/geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/AbstractRedisListIntegrationTest.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.geode.redis.internal.commands.executor.list; + +import static org.apache.geode.test.dunit.rules.RedisClusterStartupRule.BIND_ADDRESS; +import static org.apache.geode.test.dunit.rules.RedisClusterStartupRule.REDIS_CLIENT_TIMEOUT; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import redis.clients.jedis.HostAndPort; +import redis.clients.jedis.
[geode] branch develop updated (32e32af -> e0c4b9c)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 32e32af GEODE-9830: SINTERSTORE Command Support (#7302) add e0c4b9c GEODE-9988: Log full exception when JNDI binding fails during cache creation (#7304) No new revisions were added by this update. Summary of changes: geode-core/src/main/java/org/apache/geode/internal/jndi/JNDIInvoker.java | 1 + 1 file changed, 1 insertion(+)
[geode] branch support/1.15 updated (0271f6a -> 0331eee)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch support/1.15 in repository https://gitbox.apache.org/repos/asf/geode.git. from 0271f6a GEODE-8616: Refactoring the test to remove deprecated APIs (#7301) new 08d2006 Revert "GEODE-9883 Update Geode for Redis docs file (#7274)" new d1d5e1e GEODE-9977: Remove defunct RedisCommandSupportLevel.INTERNAL type (#7283) new 0ade491 GEODE-9837: SUNIONSTORE Command Support (#7284) new d456338 GEODE-9834: SRANDMEMBER Command Support (#7228) new 9166cb4 GEODE-9885: Handle duplicated appends in Redis StringsDUnitTest (#7290) new 731fcd0 update redis svg to use new module name (#7288) new ebd17de GEODE-9922: Move Redis cross-slot checking to RegionProvider (#7295) new 9b8a768 GEODE-9883 Update Geode for Redis docs file (#7274) new 0331eee GEODE-9830: SINTERSTORE Command Support (#7302) The 9 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: geode-docs/images_svg/geode_for_redis.svg | 206 +++-- geode-for-redis/README.md | 3 + ...a => SInterStoreNativeRedisAcceptanceTest.java} | 2 +- ...a => SRandMemberNativeRedisAcceptanceTest.java} | 2 +- ...a => SUnionStoreNativeRedisAcceptanceTest.java} | 2 +- .../resources/0001-configure-redis-tests.patch | 340 - .../commands/executor/string/StringsDUnitTest.java | 71 +++-- .../key/AbstractRenameIntegrationTest.java | 15 +- .../key/AbstractRenameNXIntegrationTest.java | 12 + .../server/AbstractHitsMissesIntegrationTest.java | 34 +-- .../executor/set/AbstractSDiffIntegrationTest.java | 15 +- .../set/AbstractSDiffStoreIntegrationTest.java | 15 +- .../set/AbstractSInterIntegrationTest.java | 148 + .../set/AbstractSInterStoreIntegrationTest.java| 237 ++ .../executor/set/AbstractSMoveIntegrationTest.java | 165 +- .../set/AbstractSRandMemberIntegrationTest.java| 165 ++ .../set/AbstractSUnionIntegrationTest.java | 151 + .../set/AbstractSUnionStoreIntegrationTest.java| 244 +++ .../executor/set/AbstractSetsIntegrationTest.java | 49 --- ...onTest.java => SInterStoreIntegrationTest.java} | 2 +- ...onTest.java => SRandMemberIntegrationTest.java} | 2 +- ...onTest.java => SUnionStoreIntegrationTest.java} | 2 +- .../string/AbstractMSetIntegrationTest.java| 3 +- .../string/AbstractMSetNXIntegrationTest.java | 3 +- .../apache/geode/codeAnalysis/excludedClasses.txt | 1 + .../geode/redis/internal/RedisConstants.java | 2 - .../commands/RedisCommandSupportLevel.java | 3 +- .../redis/internal/commands/RedisCommandType.java | 18 +- .../executor/key/AbstractRenameExecutor.java | 5 - .../executor/server/COMMANDCommandExecutor.java| 3 +- .../commands/executor/set/SDiffExecutor.java | 17 +- .../commands/executor/set/SDiffStoreExecutor.java | 14 +- .../commands/executor/set/SInterExecutor.java | 16 +- .../commands/executor/set/SInterStoreExecutor.java | 13 +- .../commands/executor/set/SMoveExecutor.java | 9 - .../commands/executor/set/SRandMemberExecutor.java | 50 +-- .../commands/executor/set/SUnionExecutor.java | 16 +- .../commands/executor/set/SUnionStoreExecutor.java | 13 +- .../commands/executor/set/SetOpExecutor.java | 167 ++ ...dMemberExecutor.java => SetRandomExecutor.java} | 52 ++-- .../executor/sortedset/ZInterStoreExecutor.java| 2 +- .../executor/sortedset/ZStoreExecutor.java | 14 +- .../executor/sortedset/ZUnionStoreExecutor.java| 2 +- .../executor/string/AbstractMSetExecutor.java | 8 +- .../geode/redis/internal/data/NullRedisSet.java| 2 +- .../geode/redis/internal/data/NullRedisString.java | 5 - ...Exception.java => RedisCrossSlotException.java} | 12 +- .../apache/geode/redis/internal/data/RedisSet.java | 142 + .../geode/redis/internal/data/RedisString.java | 6 +- .../SizeableObjectOpenCustomHashSet.java | 8 + .../internal/netty/ExecutionHandlerContext.java| 3 + .../redis/internal/services/RegionProvider.java| 20 +- .../internal/services/RegionProviderTest.java | 74 + 53 files changed, 1710 insertions(+), 875 deletions(-) copy geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/{SMoveNativeRedisAcceptanceTest.java => SInterStoreNativeRedisAcceptanceTest.java} (92%) copy geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/{SCardNativeRedisAcceptanceTest.java => SRand
[geode] 02/09: GEODE-9977: Remove defunct RedisCommandSupportLevel.INTERNAL type (#7283)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch support/1.15 in repository https://gitbox.apache.org/repos/asf/geode.git commit d1d5e1e7c09f89a81cdaed6d4478d2f8cd121a41 Author: Donal Evans AuthorDate: Thu Jan 20 08:53:14 2022 -0800 GEODE-9977: Remove defunct RedisCommandSupportLevel.INTERNAL type (#7283) Authored-by: Donal Evans (cherry picked from commit b349cb8b33fb0c93c0a3ea6a2f6c32bd33b51319) --- .../geode/redis/internal/commands/RedisCommandSupportLevel.java | 3 +-- .../org/apache/geode/redis/internal/commands/RedisCommandType.java | 6 -- .../internal/commands/executor/server/COMMANDCommandExecutor.java | 3 +-- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/RedisCommandSupportLevel.java b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/RedisCommandSupportLevel.java index a8f6796..15caf12 100644 --- a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/RedisCommandSupportLevel.java +++ b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/RedisCommandSupportLevel.java @@ -19,6 +19,5 @@ package org.apache.geode.redis.internal.commands; public enum RedisCommandSupportLevel { SUPPORTED, UNSUPPORTED, - UNKNOWN, - INTERNAL + UNKNOWN } diff --git a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/RedisCommandType.java b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/RedisCommandType.java index acf335f..3a461de 100755 --- a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/RedisCommandType.java +++ b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/RedisCommandType.java @@ -16,7 +16,6 @@ package org.apache.geode.redis.internal.commands; import static org.apache.geode.redis.internal.RedisConstants.ERROR_SYNTAX; -import static org.apache.geode.redis.internal.commands.RedisCommandSupportLevel.INTERNAL; import static org.apache.geode.redis.internal.commands.RedisCommandSupportLevel.SUPPORTED; import static org.apache.geode.redis.internal.commands.RedisCommandSupportLevel.UNSUPPORTED; import static org.apache.geode.redis.internal.commands.RedisCommandType.Flag.ADMIN; @@ -447,11 +446,6 @@ public enum RedisCommandType { return supportLevel == UNSUPPORTED; } - - public boolean isInternal() { -return supportLevel == INTERNAL; - } - public boolean isUnknown() { return supportLevel == RedisCommandSupportLevel.UNKNOWN; } diff --git a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/server/COMMANDCommandExecutor.java b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/server/COMMANDCommandExecutor.java index 1557d92..b5950a8 100644 --- a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/server/COMMANDCommandExecutor.java +++ b/geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/server/COMMANDCommandExecutor.java @@ -62,8 +62,7 @@ public class COMMANDCommandExecutor implements CommandExecutor { List response = new ArrayList<>(); for (RedisCommandType type : RedisCommandType.values()) { - if (type.isInternal() - || type.isUnknown() + if (type.isUnknown() || (type.isUnsupported() && !context.allowUnsupportedCommands()) || type == RedisCommandType.QUIT) { continue;
[geode] 01/09: Revert "GEODE-9883 Update Geode for Redis docs file (#7274)"
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch support/1.15 in repository https://gitbox.apache.org/repos/asf/geode.git commit 08d2006cac31be6bf97cc30f3edd63eacc241a39 Author: Jens Deppe AuthorDate: Fri Jan 28 09:38:42 2022 -0800 Revert "GEODE-9883 Update Geode for Redis docs file (#7274)" This reverts commit 49367309e65b5b9710cac0646fe950173af2e1bc. --- .../source/subnavs/geode-subnav.erb| 24 +- .../tools_modules/geode_for_redis.html.md.erb | 292 ++--- 2 files changed, 158 insertions(+), 158 deletions(-) diff --git a/geode-book/master_middleman/source/subnavs/geode-subnav.erb b/geode-book/master_middleman/source/subnavs/geode-subnav.erb index 372a42a..094959b 100644 --- a/geode-book/master_middleman/source/subnavs/geode-subnav.erb +++ b/geode-book/master_middleman/source/subnavs/geode-subnav.erb @@ -2105,8 +2105,28 @@ limitations under the License. - -Geode for Redis + +<%=vars.product_name%> for Redis + + +Using <%=vars.product_name%> for Redis + + +Supported Redis Commands + + +Advantages of <%=vars.product_name%> over Redis + + +Expiration Accuracy + + + High Availability Model + + + Loss of Connections + + Gemcached diff --git a/geode-docs/tools_modules/geode_for_redis.html.md.erb b/geode-docs/tools_modules/geode_for_redis.html.md.erb index 482d817..9451dc7 100644 --- a/geode-docs/tools_modules/geode_for_redis.html.md.erb +++ b/geode-docs/tools_modules/geode_for_redis.html.md.erb @@ -25,233 +25,213 @@ optional password authentication. -## Using <%=vars.product_name%> for Redis +## Using <%=vars.product_name%> for Redis The <%=vars.product_name%> cluster must have at least one server that is set up to handle the incoming Redis commands. -Prerequisites for running the examples: +Use gfsh to start at least one server with a command of the form: -1. **Install <%=vars.product_name%>** -Using the instructions in the `README.md` file in the root of the <%=vars.product_name%> checkout directory, build and install <%=vars.product_name%>. -2. **Install the Redis CLI** -Follow installation instructions at https://redis.io/download +```pre +start server \ + --name= \ + --locators= \ + --J=-Dgemfire.geode-for-redis-enabled=true \ + --J=-Dgemfire.geode-for-redis-port= \ + --J=-Dgemfire.geode-for-redis-bind-address= +``` -Use `gfsh` to start a locator for managing a <%=vars.product_name%> cluster: +If the gemfire property `geode-for-redis-enabled`, is set to `true`, a <%=vars.product_name%> +server with <%=vars.product_name%> for Redis will be started. -```commandLine -gfsh> start locator -``` +Replace `` with the name of your server. -Use `gfsh` to start at least one server with a command of the form: +Replace `` with your locator port. -```commandLine -gfsh> start server --J=-Dgemfire.geode-for-redis-enabled=true --J=-Dgemfire.geode-for-redis-port=6379 -``` +Replace `` with the port that the <%=vars.product_name%> server + listens on for Redis commands. The typical port used with a cluster compatible with Redis is 6379. -More information about the options when starting a server is given in the section [Start Server Options](#redis-start-server-options) below. +Replace `` with the address of the server host. -To confirm the server is listening, in a separate terminal run: +Replace `` with the password clients use to authenticate. -```commandLine -$ redis-cli -c ping +To confirm the server is listening, run: + +``` pre +redis-cli -h -p -a ping ``` -The `-c` option enables cluster mode in the redis-cli, which is necessary since -<%=vars.product_name%> for Redis runs as a Redis Cluster. +Replace ``,``, and `` with the same values as the server. If the server is functioning properly, you should see a response of `PONG`. -### Add an additional server -If you’re interested in testing <%=vars.product_name%> scalability, in gfsh run the `start server` command again. +## Supported Redis Commands -However, there are two ports that must be uniq
[geode] 03/09: GEODE-9837: SUNIONSTORE Command Support (#7284)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch support/1.15 in repository https://gitbox.apache.org/repos/asf/geode.git commit 0ade491c33f55176d7ea7fa9d07fa028e9857c90 Author: Kris10 AuthorDate: Thu Jan 20 14:11:41 2022 -0800 GEODE-9837: SUNIONSTORE Command Support (#7284) (cherry picked from commit 3a36962edfcd30aa3afa3a50813c63bfc155f699) --- .../tools_modules/geode_for_redis.html.md.erb | 1 + geode-for-redis/README.md | 1 + .../set/SUnionStoreNativeRedisAcceptanceTest.java | 36 +++ .../server/AbstractHitsMissesIntegrationTest.java | 12 +- .../set/AbstractSUnionIntegrationTest.java | 141 .../set/AbstractSUnionStoreIntegrationTest.java| 242 + .../executor/set/SUnionStoreIntegrationTest.java | 31 +++ .../redis/internal/commands/RedisCommandType.java | 4 +- .../commands/executor/set/SetOpExecutor.java | 16 +- .../apache/geode/redis/internal/data/RedisSet.java | 18 +- 10 files changed, 344 insertions(+), 158 deletions(-) diff --git a/geode-docs/tools_modules/geode_for_redis.html.md.erb b/geode-docs/tools_modules/geode_for_redis.html.md.erb index 9451dc7..748ddf8 100644 --- a/geode-docs/tools_modules/geode_for_redis.html.md.erb +++ b/geode-docs/tools_modules/geode_for_redis.html.md.erb @@ -125,6 +125,7 @@ If the server is functioning properly, you should see a response of `PONG`. - STRLEN - SUBSCRIBE - SUNION + - SUNIONSTORE - TTL - TYPE - UNSUBSCRIBE diff --git a/geode-for-redis/README.md b/geode-for-redis/README.md index 2162229..fa392d9 100644 --- a/geode-for-redis/README.md +++ b/geode-for-redis/README.md @@ -215,6 +215,7 @@ Geode for Redis implements a subset of the full Redis command set. - STRLEN - SUBSCRIBE - SUNION +- SUNIONSTORE - TTL - TYPE - UNSUBSCRIBE diff --git a/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SUnionStoreNativeRedisAcceptanceTest.java b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SUnionStoreNativeRedisAcceptanceTest.java new file mode 100644 index 000..8f63afa --- /dev/null +++ b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SUnionStoreNativeRedisAcceptanceTest.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.geode.redis.internal.commands.executor.set; + +import org.junit.ClassRule; + +import org.apache.geode.redis.NativeRedisClusterTestRule; + +public class SUnionStoreNativeRedisAcceptanceTest extends AbstractSUnionStoreIntegrationTest { + + @ClassRule + public static NativeRedisClusterTestRule redis = new NativeRedisClusterTestRule(); + + @Override + public int getPort() { +return redis.getExposedPorts().get(0); + } + + @Override + public void flushAll() { +redis.flushAll(); + } + +} diff --git a/geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractHitsMissesIntegrationTest.java b/geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractHitsMissesIntegrationTest.java index 1c9a0da..5923e07 100644 --- a/geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractHitsMissesIntegrationTest.java +++ b/geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractHitsMissesIntegrationTest.java @@ -419,6 +419,12 @@ public abstract class AbstractHitsMissesIntegrationTest implements RedisIntegrat runMultiKeyCommandAndAssertHitsAndMisses(SET_KEY, (k1, k2) -> jedis.sunion(k1, k2)); } + @Test + public void testSunionstore() { +runMultiKeyCommandAndAssertNoStatUpdates(SET_KEY, +(k1, k2) -> jedis.sunionstore(HASHTAG + "dest", k1, k2)); + } + /* Hash related commands */ @Test public void testHset() { @@ -565,12 +571,6 @@ public abstract class AbstractHitsMissesIntegrationTest implements RedisIntegrat (k1, k2) -> jed
[geode] 06/09: update redis svg to use new module name (#7288)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch support/1.15 in repository https://gitbox.apache.org/repos/asf/geode.git commit 731fcd0bb5a1ca29a78f5b7dbe07450ccc563c5f Author: Hale Bales AuthorDate: Fri Jan 21 15:31:49 2022 -0800 update redis svg to use new module name (#7288) (cherry picked from commit 66eb3f93aa44613a355515ee7d8e0bb36775d932) --- geode-docs/images_svg/geode_for_redis.svg | 206 +++--- 1 file changed, 188 insertions(+), 18 deletions(-) diff --git a/geode-docs/images_svg/geode_for_redis.svg b/geode-docs/images_svg/geode_for_redis.svg index f983cf8..26efc38 100644 --- a/geode-docs/images_svg/geode_for_redis.svg +++ b/geode-docs/images_svg/geode_for_redis.svg @@ -1,19 +1,189 @@ -http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink";> - - - - - - - - - - - - - +http://www.inkscape.org/namespaces/inkscape"; + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"; + xmlns:xlink="http://www.w3.org/1999/xlink"; + xmlns="http://www.w3.org/2000/svg"; + xmlns:svg="http://www.w3.org/2000/svg";> + + + + + + + + + + + + +Geode for Redis + + + + + + + + + + + Geode for Redis
[geode] 05/09: GEODE-9885: Handle duplicated appends in Redis StringsDUnitTest (#7290)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch support/1.15 in repository https://gitbox.apache.org/repos/asf/geode.git commit 9166cb44ec2854c8c5d501334476f0d6dfe9d258 Author: Donal Evans AuthorDate: Fri Jan 21 15:28:10 2022 -0800 GEODE-9885: Handle duplicated appends in Redis StringsDUnitTest (#7290) * GEODE-9885: Handle duplicated appends in Redis StringsDUnitTest - The Jedis client automatically retries when a bucket is moved during an APPEND operation, which can lead to the append being duplicated. Add error handling to the test to check if unexpected append values are duplicates of the previous append and if so, ignore the AssertionError - Add missing synchronization around in-place array modification in RedisString.applyReplaceByteArrayAtOffsetDelta() method - Remove unnecessarily overridden method from NullRedisSet Authored-by: Donal Evans (cherry picked from commit b8dd86b846083a59ffe1aa56b489df60f4d75d39) --- .../commands/executor/string/StringsDUnitTest.java | 71 +- .../geode/redis/internal/data/NullRedisString.java | 5 -- .../geode/redis/internal/data/RedisString.java | 6 +- 3 files changed, 47 insertions(+), 35 deletions(-) diff --git a/geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/string/StringsDUnitTest.java b/geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/string/StringsDUnitTest.java index 2a4479a..a8f8ff4 100644 --- a/geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/string/StringsDUnitTest.java +++ b/geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/string/StringsDUnitTest.java @@ -30,7 +30,6 @@ import java.util.function.Consumer; import org.junit.After; import org.junit.AfterClass; -import org.junit.Assert; import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.Rule; @@ -57,14 +56,13 @@ public class StringsDUnitTest { private static final int NUM_ITERATIONS = 1000; private static JedisCluster jedisCluster; - private static MemberVM locator; - @BeforeClass public static void classSetup() { -locator = clusterStartUp.startLocatorVM(0); -clusterStartUp.startRedisVM(1, locator.getPort()); -clusterStartUp.startRedisVM(2, locator.getPort()); -clusterStartUp.startRedisVM(3, locator.getPort()); +MemberVM locator = clusterStartUp.startLocatorVM(0); +int locatorPort = locator.getPort(); +clusterStartUp.startRedisVM(1, locatorPort); +clusterStartUp.startRedisVM(2, locatorPort); +clusterStartUp.startRedisVM(3, locatorPort); int redisServerPort1 = clusterStartUp.getRedisPort(1); jedisCluster = @@ -263,9 +261,9 @@ public class StringsDUnitTest { hashtags.add(clusterStartUp.getKeyOnServer("append", 2)); hashtags.add(clusterStartUp.getKeyOnServer("append", 3)); -Runnable task1 = () -> appendPerformAndVerify(1, 1, hashtags.get(0), running); -Runnable task2 = () -> appendPerformAndVerify(2, 1, hashtags.get(1), running); -Runnable task3 = () -> appendPerformAndVerify(3, 1, hashtags.get(2), running); +Runnable task1 = () -> appendPerformAndVerify(1, hashtags.get(0), running); +Runnable task2 = () -> appendPerformAndVerify(2, hashtags.get(1), running); +Runnable task3 = () -> appendPerformAndVerify(3, hashtags.get(2), running); Future future1 = executor.runAsync(task1); Future future2 = executor.runAsync(task2); @@ -276,11 +274,6 @@ public class StringsDUnitTest { GeodeAwaitility.await().during(Duration.ofMillis(200)).until(() -> true); } -for (int i = 0; i < 100 && running.get(); i++) { - clusterStartUp.moveBucketForKey(hashtags.get(i % hashtags.size())); - GeodeAwaitility.await().during(Duration.ofMillis(200)).until(() -> true); -} - running.set(false); future1.get(); @@ -288,12 +281,11 @@ public class StringsDUnitTest { future3.get(); } - private void appendPerformAndVerify(int index, int minimumIterations, String hashtag, - AtomicBoolean isRunning) { + private void appendPerformAndVerify(int index, String hashtag, AtomicBoolean isRunning) { String key = "{" + hashtag + "}-key-" + index; int iterationCount = 0; -while (iterationCount < minimumIterations || isRunning.get()) { +while (isRunning.get()) { String appendString = "-" + key + "-" + iterationCount + "-"; try { jedisCluster.append(key, appendString); @@ -301,23 +293,46 @@ public class StringsDUnitTest { isRunning.set(false); throw new RuntimeException("Exception performing APPEND " + appendString, ex); } - itera
[geode] 04/09: GEODE-9834: SRANDMEMBER Command Support (#7228)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch support/1.15 in repository https://gitbox.apache.org/repos/asf/geode.git commit d4563383d0e8dbbd8f67f28d3367664c5c8f518b Author: Kris10 AuthorDate: Fri Jan 21 10:14:07 2022 -0800 GEODE-9834: SRANDMEMBER Command Support (#7228) (cherry picked from commit a53c6da8dad75c8953de7e7ceb4bbfa545e5f405) --- .../tools_modules/geode_for_redis.html.md.erb | 1 + geode-for-redis/README.md | 1 + .../set/SRandMemberNativeRedisAcceptanceTest.java | 34 + .../server/AbstractHitsMissesIntegrationTest.java | 10 +- .../set/AbstractSRandMemberIntegrationTest.java| 165 + .../executor/set/AbstractSetsIntegrationTest.java | 49 -- .../executor/set/SRandMemberIntegrationTest.java | 29 .../redis/internal/commands/RedisCommandType.java | 4 +- .../commands/executor/set/SRandMemberExecutor.java | 50 +-- ...dMemberExecutor.java => SetRandomExecutor.java} | 52 --- .../geode/redis/internal/data/NullRedisSet.java| 2 +- .../apache/geode/redis/internal/data/RedisSet.java | 85 ++- .../SizeableObjectOpenCustomHashSet.java | 8 + 13 files changed, 330 insertions(+), 160 deletions(-) diff --git a/geode-docs/tools_modules/geode_for_redis.html.md.erb b/geode-docs/tools_modules/geode_for_redis.html.md.erb index 748ddf8..475fc7d 100644 --- a/geode-docs/tools_modules/geode_for_redis.html.md.erb +++ b/geode-docs/tools_modules/geode_for_redis.html.md.erb @@ -121,6 +121,7 @@ If the server is functioning properly, you should see a response of `PONG`. - SLOWLOG **[3]** - SMEMBERS - SMOVE + - SRANDMEMBER - SREM - STRLEN - SUBSCRIBE diff --git a/geode-for-redis/README.md b/geode-for-redis/README.md index fa392d9..592b129 100644 --- a/geode-for-redis/README.md +++ b/geode-for-redis/README.md @@ -211,6 +211,7 @@ Geode for Redis implements a subset of the full Redis command set. - SLOWLOG 3 - SMEMBERS - SMOVE +- SRANDMEMBER - SREM - STRLEN - SUBSCRIBE diff --git a/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SRandMemberNativeRedisAcceptanceTest.java b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SRandMemberNativeRedisAcceptanceTest.java new file mode 100644 index 000..dcab8c0 --- /dev/null +++ b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SRandMemberNativeRedisAcceptanceTest.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.geode.redis.internal.commands.executor.set; + +import org.junit.ClassRule; + +import org.apache.geode.redis.NativeRedisClusterTestRule; + +public class SRandMemberNativeRedisAcceptanceTest extends AbstractSRandMemberIntegrationTest { + @ClassRule + public static NativeRedisClusterTestRule redis = new NativeRedisClusterTestRule(); + + @Override + public int getPort() { +return redis.getExposedPorts().get(0); + } + + @Override + public void flushAll() { +redis.flushAll(); + } +} diff --git a/geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractHitsMissesIntegrationTest.java b/geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractHitsMissesIntegrationTest.java index 5923e07..23735d9 100644 --- a/geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractHitsMissesIntegrationTest.java +++ b/geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractHitsMissesIntegrationTest.java @@ -410,6 +410,11 @@ public abstract class AbstractHitsMissesIntegrationTest implements RedisIntegrat } @Test + public void testSrandmember() { +runCommandAndAssertHitsAndMisses(SET_KEY, k -> jedis.srandmember(k)); + } + + @Test public void testSrem() { runCommandAndAssertNoStatUpdates(SET_KEY, k -> jedis.srem(k, "member")); } @@
[geode] 07/09: GEODE-9922: Move Redis cross-slot checking to RegionProvider (#7295)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch support/1.15 in repository https://gitbox.apache.org/repos/asf/geode.git commit ebd17de286f5e12945c239ad6dfc9fd658ed7d8b Author: Donal Evans AuthorDate: Fri Jan 21 17:54:03 2022 -0800 GEODE-9922: Move Redis cross-slot checking to RegionProvider (#7295) * GEODE-9922: Move Redis cross-slot checking to RegionProvider - Move duplicated logic for determining if Keys are in different slots from various Executors to RegionProvider - Removed manual checks for if the key is local, as this is performed as part of locking the primary bucket - Created RedisCrossSlotException class - Added unit tests for new method in RegionProvider - Refactor SetOpExecutor to also lock the destination key for *STORE commands - Add missing test cases for cross-slot errors - Correct some tests for cross-slot behaviour that were inadvertantly testing the Jedis client's response rather than the Geode for Redis server - Changed name format for constants in AbstractSMoveIntegrationTest - Modify patch file to ensure tcl tests use keys with the same slot Authored-by: Donal Evans (cherry picked from commit 7b0a88dbee36c6eb51513715af943f80ea6d93f9) --- .../resources/0001-configure-redis-tests.patch | 340 - .../key/AbstractRenameIntegrationTest.java | 15 +- .../key/AbstractRenameNXIntegrationTest.java | 12 + .../executor/set/AbstractSDiffIntegrationTest.java | 15 +- .../set/AbstractSDiffStoreIntegrationTest.java | 15 +- .../set/AbstractSInterIntegrationTest.java | 14 +- .../executor/set/AbstractSMoveIntegrationTest.java | 165 +- .../set/AbstractSUnionIntegrationTest.java | 10 +- .../set/AbstractSUnionStoreIntegrationTest.java| 8 +- .../string/AbstractMSetIntegrationTest.java| 3 +- .../string/AbstractMSetNXIntegrationTest.java | 3 +- .../apache/geode/codeAnalysis/excludedClasses.txt | 1 + .../geode/redis/internal/RedisConstants.java | 2 - .../executor/key/AbstractRenameExecutor.java | 5 - .../commands/executor/set/SMoveExecutor.java | 9 - .../commands/executor/set/SetOpExecutor.java | 22 +- .../executor/sortedset/ZInterStoreExecutor.java| 2 +- .../executor/sortedset/ZStoreExecutor.java | 14 +- .../executor/sortedset/ZUnionStoreExecutor.java| 2 +- .../executor/string/AbstractMSetExecutor.java | 8 +- .../internal/data/RedisCrossSlotException.java | 30 ++ .../internal/netty/ExecutionHandlerContext.java| 3 + .../redis/internal/services/RegionProvider.java| 20 +- .../internal/services/RegionProviderTest.java | 74 + 24 files changed, 635 insertions(+), 157 deletions(-) diff --git a/geode-for-redis/src/acceptanceTest/resources/0001-configure-redis-tests.patch b/geode-for-redis/src/acceptanceTest/resources/0001-configure-redis-tests.patch index 88e1318..f9952bd 100644 --- a/geode-for-redis/src/acceptanceTest/resources/0001-configure-redis-tests.patch +++ b/geode-for-redis/src/acceptanceTest/resources/0001-configure-redis-tests.patch @@ -111,7 +111,7 @@ index f5da728e8..13985dce2 100644 test {Once AUTH succeeded we can actually send commands to the server} { diff --git a/tests/unit/dump.tcl b/tests/unit/dump.tcl -index 4c4e5d075..18bb694f2 100644 +index 4c4e5d075..e465300f4 100644 --- a/tests/unit/dump.tcl +++ b/tests/unit/dump.tcl @@ -41,34 +41,35 @@ start_server {tags {"dump"}} { @@ -162,7 +162,7 @@ index 4c4e5d075..18bb694f2 100644 +#assert {$idle >= 1000 && $idle <= 1010} +#r get foo +#} {bar} -+# ++# +#test {RESTORE can set LFU} { +#r set foo bar +#set encoded [r dump foo] @@ -1337,7 +1337,7 @@ index d2c679d32..6d17de48b 100644 # The following test can only be executed if we don't use Valgrind, and if # we are using x86_64 architecture, because: diff --git a/tests/unit/type/set.tcl b/tests/unit/type/set.tcl -index 7b467f1c4..21f0721c4 100644 +index 7b467f1c4..0c5ca1753 100644 --- a/tests/unit/type/set.tcl +++ b/tests/unit/type/set.tcl @@ -34,8 +34,8 @@ start_server { @@ -1360,15 +1360,341 @@ index 7b467f1c4..21f0721c4 100644 assert_encoding intset myintset assert_encoding hashtable mylargeintset assert_encoding hashtable myhashset -@@ -157,7 +157,7 @@ start_server { +@@ -113,19 +113,19 @@ start_server { + + foreach {type} {hashtable intset} { + for {set i 1} {$i <= 5} {incr i} { +-r del [format "set%d" $i] ++r del [format "{tag}set%d" $i] + } + for {set i 0} {$i < 200} {incr i} { +-r sadd set1 $i +-r sadd set2 [expr $i+195] ++r sadd "{tag}set1" $i ++r sadd &
[geode] 08/09: GEODE-9883 Update Geode for Redis docs file (#7274)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch support/1.15 in repository https://gitbox.apache.org/repos/asf/geode.git commit 9b8a768aa059ef1a08b8574d87f90a91d7409276 Author: Eric Zoerner AuthorDate: Wed Jan 26 16:05:17 2022 -0800 GEODE-9883 Update Geode for Redis docs file (#7274) Co-authored-by: Dave Barnes (cherry picked from commit 1eeccabe35466883611803ed2516145564c4cfa3) --- .../source/subnavs/geode-subnav.erb| 24 +- .../tools_modules/geode_for_redis.html.md.erb | 294 +++-- 2 files changed, 158 insertions(+), 160 deletions(-) diff --git a/geode-book/master_middleman/source/subnavs/geode-subnav.erb b/geode-book/master_middleman/source/subnavs/geode-subnav.erb index 094959b..372a42a 100644 --- a/geode-book/master_middleman/source/subnavs/geode-subnav.erb +++ b/geode-book/master_middleman/source/subnavs/geode-subnav.erb @@ -2105,28 +2105,8 @@ limitations under the License. - -<%=vars.product_name%> for Redis - - -Using <%=vars.product_name%> for Redis - - -Supported Redis Commands - - -Advantages of <%=vars.product_name%> over Redis - - -Expiration Accuracy - - - High Availability Model - - - Loss of Connections - - + +Geode for Redis Gemcached diff --git a/geode-docs/tools_modules/geode_for_redis.html.md.erb b/geode-docs/tools_modules/geode_for_redis.html.md.erb index 475fc7d..482d817 100644 --- a/geode-docs/tools_modules/geode_for_redis.html.md.erb +++ b/geode-docs/tools_modules/geode_for_redis.html.md.erb @@ -25,215 +25,233 @@ optional password authentication. -## Using <%=vars.product_name%> for Redis +## Using <%=vars.product_name%> for Redis The <%=vars.product_name%> cluster must have at least one server that is set up to handle the incoming Redis commands. -Use gfsh to start at least one server with a command of the form: +Prerequisites for running the examples: -```pre -start server \ - --name= \ - --locators= \ - --J=-Dgemfire.geode-for-redis-enabled=true \ - --J=-Dgemfire.geode-for-redis-port= \ - --J=-Dgemfire.geode-for-redis-bind-address= -``` - -If the gemfire property `geode-for-redis-enabled`, is set to `true`, a <%=vars.product_name%> -server with <%=vars.product_name%> for Redis will be started. +1. **Install <%=vars.product_name%>** +Using the instructions in the `README.md` file in the root of the <%=vars.product_name%> checkout directory, build and install <%=vars.product_name%>. +2. **Install the Redis CLI** +Follow installation instructions at https://redis.io/download -Replace `` with the name of your server. +Use `gfsh` to start a locator for managing a <%=vars.product_name%> cluster: -Replace `` with your locator port. +```commandLine +gfsh> start locator +``` -Replace `` with the port that the <%=vars.product_name%> server - listens on for Redis commands. The typical port used with a cluster compatible with Redis is 6379. +Use `gfsh` to start at least one server with a command of the form: -Replace `` with the address of the server host. +```commandLine +gfsh> start server --J=-Dgemfire.geode-for-redis-enabled=true --J=-Dgemfire.geode-for-redis-port=6379 +``` -Replace `` with the password clients use to authenticate. +More information about the options when starting a server is given in the section [Start Server Options](#redis-start-server-options) below. -To confirm the server is listening, run: +To confirm the server is listening, in a separate terminal run: -``` pre -redis-cli -h -p -a ping +```commandLine +$ redis-cli -c ping ``` -Replace ``,``, and `` with the same values as the server. +The `-c` option enables cluster mode in the redis-cli, which is necessary since +<%=vars.product_name%> for Redis runs as a Redis Cluster. If the server is functioning properly, you should see a response of `PONG`. -## Supported Redis Commands +### Add an additional server +If you’re interested in testing <%=vars.product_name%> scalability, in gfsh run the `start server` command again. -<%=vars.product_nam
[geode] 09/09: GEODE-9830: SINTERSTORE Command Support (#7302)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch support/1.15 in repository https://gitbox.apache.org/repos/asf/geode.git commit 0331eeeb0895167680e3d3f876bf05b457fec5aa Author: Kris10 AuthorDate: Thu Jan 27 12:40:53 2022 -0800 GEODE-9830: SINTERSTORE Command Support (#7302) (cherry picked from commit 32e32af84a2727b3589d5940546ccc655a40e69d) --- geode-for-redis/README.md | 1 + .../set/SInterStoreNativeRedisAcceptanceTest.java} | 20 ++- .../server/AbstractHitsMissesIntegrationTest.java | 12 +- .../set/AbstractSInterIntegrationTest.java | 140 + ...ava => AbstractSInterStoreIntegrationTest.java} | 127 +++ .../set/AbstractSUnionStoreIntegrationTest.java| 2 +- .../executor/set/SInterStoreIntegrationTest.java} | 18 +-- .../redis/internal/commands/RedisCommandType.java | 4 +- .../commands/executor/set/SDiffExecutor.java | 17 +- .../commands/executor/set/SDiffStoreExecutor.java | 14 +- .../commands/executor/set/SInterExecutor.java | 16 +- .../commands/executor/set/SInterStoreExecutor.java | 13 +- .../commands/executor/set/SUnionExecutor.java | 16 +- .../commands/executor/set/SUnionStoreExecutor.java | 13 +- .../commands/executor/set/SetOpExecutor.java | 173 +++-- .../apache/geode/redis/internal/data/RedisSet.java | 51 +++--- 16 files changed, 196 insertions(+), 441 deletions(-) diff --git a/geode-for-redis/README.md b/geode-for-redis/README.md index 592b129..183d148 100644 --- a/geode-for-redis/README.md +++ b/geode-for-redis/README.md @@ -203,6 +203,7 @@ Geode for Redis implements a subset of the full Redis command set. - SDIFF - SDIFFSTORE - SINTER +- SINTERSTORE - SISMEMBER - SET - SETEX diff --git a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SDiffExecutor.java b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SInterStoreNativeRedisAcceptanceTest.java similarity index 69% copy from geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SDiffExecutor.java copy to geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SInterStoreNativeRedisAcceptanceTest.java index 1021b86..b19232a 100755 --- a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SDiffExecutor.java +++ b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SInterStoreNativeRedisAcceptanceTest.java @@ -14,18 +14,24 @@ */ package org.apache.geode.redis.internal.commands.executor.set; -import java.util.Set; -public class SDiffExecutor extends SetOpExecutor { +import org.junit.ClassRule; + +import org.apache.geode.redis.NativeRedisClusterTestRule; + +public class SInterStoreNativeRedisAcceptanceTest extends AbstractSInterStoreIntegrationTest { + + @ClassRule + public static NativeRedisClusterTestRule redis = new NativeRedisClusterTestRule(); @Override - protected boolean doSetOp(Set resultSet, Set nextSet) { -resultSet.removeAll(nextSet); -return resultSet.isEmpty(); + public int getPort() { +return redis.getExposedPorts().get(0); } @Override - protected boolean isStorage() { -return false; + public void flushAll() { +redis.flushAll(); } + } diff --git a/geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractHitsMissesIntegrationTest.java b/geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractHitsMissesIntegrationTest.java index 23735d9..0933ed6 100644 --- a/geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractHitsMissesIntegrationTest.java +++ b/geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractHitsMissesIntegrationTest.java @@ -395,6 +395,12 @@ public abstract class AbstractHitsMissesIntegrationTest implements RedisIntegrat } @Test + public void testSinterstore() { +runMultiKeyCommandAndAssertNoStatUpdates(SET_KEY, +(k1, k2) -> jedis.sinterstore(HASHTAG + "dest", k1, k2)); + } + + @Test public void testSismember() { runCommandAndAssertHitsAndMisses(SET_KEY, k -> jedis.sismember(k, "member")); } @@ -565,12 +571,6 @@ public abstract class AbstractHitsMissesIntegrationTest implements RedisIntegrat runCommandAndAssertHitsAndMisses(SET_KEY, k -> jedis.sscan(k, "0")); } - @Test - public void testSinterstore() { -runMultiKeyCommandAndAssertNoStatUpdates(SET_KEY, -(k1, k2) -> jedis.sinterstore(HASHTAG + "dest", k1, k2)); - } - /* Helper Methods */ private void runCommandAndAssertHitsA
[geode] branch develop updated (2db94b7 -> 00ccce2)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 2db94b7 Adding a script which performs validation of a release candidate add 00ccce2 GEODE-9995: Use ephemeral ports to avoid port in use issues (#7329) No new revisions were added by this update. Summary of changes: ...eRedisServerStartupUsingGfshAcceptanceTest.java | 28 +++--- 1 file changed, 14 insertions(+), 14 deletions(-)
[geode] 01/02: GEODE-9958: Add gfsh-specific tests for Radish startup (#7297)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch support/1.15 in repository https://gitbox.apache.org/repos/asf/geode.git commit 9f021cf6f6216f9a8db6d395b07b9b74745cf75d Author: Jens Deppe AuthorDate: Fri Jan 21 19:57:42 2022 -0800 GEODE-9958: Add gfsh-specific tests for Radish startup (#7297) (cherry picked from commit 77945531fafd566a0cbca7d05b5347b8ea299efc) --- .../GeodeRedisServerStartupAcceptanceTest.java | 5 -- ...eRedisServerStartupUsingGfshAcceptanceTest.java | 65 ++ 2 files changed, 65 insertions(+), 5 deletions(-) diff --git a/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/GeodeRedisServerStartupAcceptanceTest.java b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/GeodeRedisServerStartupAcceptanceTest.java index f16214c..523e63c 100644 --- a/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/GeodeRedisServerStartupAcceptanceTest.java +++ b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/GeodeRedisServerStartupAcceptanceTest.java @@ -28,7 +28,6 @@ import java.net.BindException; import java.net.InetSocketAddress; import java.net.ServerSocket; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -43,16 +42,12 @@ import org.apache.geode.test.dunit.rules.ClusterStartupRule; import org.apache.geode.test.dunit.rules.MemberVM; import org.apache.geode.test.dunit.rules.RedisClusterStartupRule; import org.apache.geode.test.junit.categories.IgnoreInRepeatTestTasks; -import org.apache.geode.test.junit.rules.GfshCommandRule; public class GeodeRedisServerStartupAcceptanceTest { @Rule public RedisClusterStartupRule cluster = new RedisClusterStartupRule(); - @ClassRule - public static GfshCommandRule gfsh = new GfshCommandRule(); - @Category(IgnoreInRepeatTestTasks.class) @Test public void startupOnDefaultPort() { diff --git a/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/GeodeRedisServerStartupUsingGfshAcceptanceTest.java b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/GeodeRedisServerStartupUsingGfshAcceptanceTest.java index 5827ccb..6ce72a5 100644 --- a/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/GeodeRedisServerStartupUsingGfshAcceptanceTest.java +++ b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/GeodeRedisServerStartupUsingGfshAcceptanceTest.java @@ -15,7 +15,9 @@ package org.apache.geode.redis.internal.commands.executor; +import static org.apache.geode.test.dunit.rules.RedisClusterStartupRule.BIND_ADDRESS; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import java.io.IOException; import java.net.InetSocketAddress; @@ -23,8 +25,12 @@ import java.net.ServerSocket; import org.junit.Rule; import org.junit.Test; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.exceptions.JedisConnectionException; +import org.apache.geode.distributed.ConfigurationProperties; import org.apache.geode.internal.AvailablePortHelper; +import org.apache.geode.internal.inet.LocalHostUtil; import org.apache.geode.test.junit.rules.gfsh.GfshExecution; import org.apache.geode.test.junit.rules.gfsh.GfshRule; import org.apache.geode.test.junit.rules.gfsh.GfshScript; @@ -99,4 +105,63 @@ public class GeodeRedisServerStartupUsingGfshAcceptanceTest { assertThat(execution.getOutputText()).containsIgnoringCase( "The geode-for-redis-bind-address 1.1.1.1 is not a valid address for this machine"); } + + @Test + public void gfshStartsRedisServer_whenRedisEnabled() { +String command = +"start server --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_ENABLED + "=true"; +gfshRule.execute(command); + +try (Jedis jedis = new Jedis(BIND_ADDRESS, 6379)) { + assertThat(jedis.ping()).isEqualTo("PONG"); +} + } + + @Test + public void gfshStartsRedisServer_whenCustomPort() { +int port = AvailablePortHelper.getRandomAvailableTCPPort(); +String command = +"start server --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_ENABLED + "=true" ++ " --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_PORT + "=" + port; + +gfshRule.execute(command); + +try (Jedis jedis = new Jedis(BIND_ADDRESS, port)) { + assertThat(jedis.ping()).isEqualTo("PONG"); +} + } + + @Test + public void gfshStartsRedisServer_whenCustomPortAndBindAddress() { +int port = AvailablePortHelper.getRandomAvailableTCPPort(); +String anyLocal = LocalHostUtil.getAnyLocalAddress().getHostAddress(); +String command = +
[geode] branch support/1.15 updated (3f56bd3 -> 55396d4)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch support/1.15 in repository https://gitbox.apache.org/repos/asf/geode.git. from 3f56bd3 GEODE-9835: Add SSCAN to Redis supported commands (#7278) new 9f021cf GEODE-9958: Add gfsh-specific tests for Radish startup (#7297) new 55396d4 GEODE-9995: Use ephemeral ports to avoid port in use issues (#7329) The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../GeodeRedisServerStartupAcceptanceTest.java | 5 -- ...eRedisServerStartupUsingGfshAcceptanceTest.java | 65 ++ 2 files changed, 65 insertions(+), 5 deletions(-)
[geode] 02/02: GEODE-9995: Use ephemeral ports to avoid port in use issues (#7329)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch support/1.15 in repository https://gitbox.apache.org/repos/asf/geode.git commit 55396d4650f5214b27982b43ea7b59d05a23ba55 Author: Jens Deppe AuthorDate: Mon Jan 31 12:04:15 2022 -0800 GEODE-9995: Use ephemeral ports to avoid port in use issues (#7329) (cherry picked from commit 00ccce2a652e6fe21b8af8a162cff35ab47f036c) --- ...eRedisServerStartupUsingGfshAcceptanceTest.java | 28 +++--- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/GeodeRedisServerStartupUsingGfshAcceptanceTest.java b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/GeodeRedisServerStartupUsingGfshAcceptanceTest.java index 6ce72a5..1377510 100644 --- a/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/GeodeRedisServerStartupUsingGfshAcceptanceTest.java +++ b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/GeodeRedisServerStartupUsingGfshAcceptanceTest.java @@ -108,8 +108,8 @@ public class GeodeRedisServerStartupUsingGfshAcceptanceTest { @Test public void gfshStartsRedisServer_whenRedisEnabled() { -String command = -"start server --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_ENABLED + "=true"; +String command = "start server --server-port=0 " ++ "--J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_ENABLED + "=true"; gfshRule.execute(command); try (Jedis jedis = new Jedis(BIND_ADDRESS, 6379)) { @@ -120,9 +120,9 @@ public class GeodeRedisServerStartupUsingGfshAcceptanceTest { @Test public void gfshStartsRedisServer_whenCustomPort() { int port = AvailablePortHelper.getRandomAvailableTCPPort(); -String command = -"start server --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_ENABLED + "=true" -+ " --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_PORT + "=" + port; +String command = "start server --server-port=0 " ++ "--J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_ENABLED + "=true" ++ " --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_PORT + "=" + port; gfshRule.execute(command); @@ -135,11 +135,11 @@ public class GeodeRedisServerStartupUsingGfshAcceptanceTest { public void gfshStartsRedisServer_whenCustomPortAndBindAddress() { int port = AvailablePortHelper.getRandomAvailableTCPPort(); String anyLocal = LocalHostUtil.getAnyLocalAddress().getHostAddress(); -String command = -"start server --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_ENABLED + "=true" -+ " --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_PORT + "=" + port -+ " --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_BIND_ADDRESS + "=" -+ anyLocal; +String command = "start server --server-port=0 " ++ "--J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_ENABLED + "=true" ++ " --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_PORT + "=" + port ++ " --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_BIND_ADDRESS + "=" ++ anyLocal; gfshRule.execute(command); @@ -152,10 +152,10 @@ public class GeodeRedisServerStartupUsingGfshAcceptanceTest { public void gfshDoesNotStartRedisServer_whenNotRedisEnabled() { int port = AvailablePortHelper.getRandomAvailableTCPPort(); String anyLocal = LocalHostUtil.getAnyLocalAddress().getHostAddress(); -String command = -"start server --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_PORT + "=" + port -+ " --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_BIND_ADDRESS + "=" -+ anyLocal; +String command = "start server --server-port=0 " ++ "--J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_PORT + "=" + port ++ " --J=-Dgemfire." + ConfigurationProperties.GEODE_FOR_REDIS_BIND_ADDRESS + "=" ++ anyLocal; gfshRule.execute(command);
[geode] branch develop updated (064fe00 -> 6413c33)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 064fe00 GEODE-: Update the Geode for Redis documentation (#7326) add 6413c33 GEODE-9994 Make Redis RENAME atomic (#7328) No new revisions were added by this update. Summary of changes: .../commands/executor/key/RenameDUnitTest.java | 117 + .../executor/key/AbstractRenameExecutor.java | 4 +- 2 files changed, 101 insertions(+), 20 deletions(-)
[geode] branch support/1.15 updated: GEODE-9994 Make Redis RENAME atomic (#7328)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch support/1.15 in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/support/1.15 by this push: new bff8082 GEODE-9994 Make Redis RENAME atomic (#7328) bff8082 is described below commit bff808245ab59e71a13e393a6301af444393abc4 Author: Eric Zoerner AuthorDate: Wed Feb 2 13:34:19 2022 -0800 GEODE-9994 Make Redis RENAME atomic (#7328) - change verification to allow for erroneous client retries - change error logging to warning level to prevent false negative test failure due to log (cherry picked from commit 6413c33d6b0050a1ebe7e88f9ea20295ab780cab) --- .../commands/executor/key/RenameDUnitTest.java | 117 + .../executor/key/AbstractRenameExecutor.java | 4 +- 2 files changed, 101 insertions(+), 20 deletions(-) diff --git a/geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/key/RenameDUnitTest.java b/geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/key/RenameDUnitTest.java index 73092a9..02dba47 100644 --- a/geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/key/RenameDUnitTest.java +++ b/geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/key/RenameDUnitTest.java @@ -15,6 +15,7 @@ package org.apache.geode.redis.internal.commands.executor.key; +import static org.apache.geode.distributed.ConfigurationProperties.GEODE_FOR_REDIS_PORT; import static org.apache.geode.test.dunit.rules.RedisClusterStartupRule.BIND_ADDRESS; import static org.apache.geode.test.dunit.rules.RedisClusterStartupRule.REDIS_CLIENT_TIMEOUT; import static org.assertj.core.api.Assertions.assertThat; @@ -33,6 +34,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicBoolean; +import org.apache.logging.log4j.Logger; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; @@ -43,16 +45,22 @@ import redis.clients.jedis.HostAndPort; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisCluster; +import org.apache.geode.cache.control.RebalanceFactory; +import org.apache.geode.cache.control.ResourceManager; +import org.apache.geode.internal.AvailablePortHelper; +import org.apache.geode.logging.internal.log4j.api.LogService; import org.apache.geode.redis.internal.RedisConstants; import org.apache.geode.redis.internal.data.RedisKey; import org.apache.geode.redis.internal.services.locking.LockingStripedCoordinator; import org.apache.geode.redis.internal.services.locking.StripedCoordinator; import org.apache.geode.test.awaitility.GeodeAwaitility; +import org.apache.geode.test.dunit.rules.ClusterStartupRule; import org.apache.geode.test.dunit.rules.MemberVM; import org.apache.geode.test.dunit.rules.RedisClusterStartupRule; import org.apache.geode.test.junit.rules.ExecutorServiceRule; public class RenameDUnitTest { + private static final Logger logger = LogService.getLogger(); @ClassRule public static RedisClusterStartupRule clusterStartUp = new RedisClusterStartupRule(3); @@ -61,14 +69,23 @@ public class RenameDUnitTest { public ExecutorServiceRule executor = new ExecutorServiceRule(); private static JedisCluster jedisCluster; - private static MemberVM locator; + private static MemberVM server1; + private static int locatorPort; + private static int server3Port; @BeforeClass public static void setup() { -locator = clusterStartUp.startLocatorVM(0); -clusterStartUp.startRedisVM(1, locator.getPort()); -clusterStartUp.startRedisVM(2, locator.getPort()); -clusterStartUp.startRedisVM(3, locator.getPort()); +final MemberVM locator = clusterStartUp.startLocatorVM(0); +locatorPort = locator.getPort(); +server1 = clusterStartUp.startRedisVM(1, locatorPort); +clusterStartUp.startRedisVM(2, locatorPort); + +server3Port = AvailablePortHelper.getRandomAvailableTCPPort(); +final String finalRedisPort = Integer.toString(server3Port); +final int finalLocatorPort = locatorPort; +clusterStartUp.startRedisVM(3, x -> x +.withProperty(GEODE_FOR_REDIS_PORT, finalRedisPort) +.withConnectionToLocator(finalLocatorPort)); int redisServerPort1 = clusterStartUp.getRedisPort(1); jedisCluster = @@ -211,6 +228,48 @@ public class RenameDUnitTest { } @Test + public void givenCrashDuringRename_thenDoesNotLeaveInconsistencies() throws Exception { +final AtomicBoolean running = new AtomicBoolean(true); + +final List hashtags = new ArrayList<>(); +hashtags.add(clusterStartUp.getKeyOnServer("rename", 1)); +hashtags.add(clusterStartUp.getKeyOnServer("rename", 2)); +hashtags.add(clusterStart
[geode] branch develop updated (a98197b -> fc3f991)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from a98197b GEODE-9990: turn DiskAccessException into CacheClosedException (#7334) add fc3f991 GEODE-10032: Add Category to RedisCommandType (#7354) No new revisions were added by this update. Summary of changes: .../executor/server/CommandIntegrationTest.java| 15 +- .../apache/geode/codeAnalysis/excludedClasses.txt | 1 + .../geode/redis/internal/RedisConstants.java | 4 +- .../redis/internal/commands/RedisCommandType.java | 409 + ...ndExecutor.java => CommandCommandExecutor.java} | 16 +- 5 files changed, 277 insertions(+), 168 deletions(-) rename geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/server/{COMMANDCommandExecutor.java => CommandCommandExecutor.java} (85%)
[geode] branch develop updated (5f79b21 -> 9ef20d9)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 5f79b21 GEODE-10057: Correct geode-for-redis docs (#7370) add 9ef20d9 GEODE-10034: Organize Geode For Redis Stats By Category (#7363) No new revisions were added by this update. Summary of changes: .../statistics/GeodeRedisStatsIntegrationTest.java | 57 + .../geode/redis/internal/GeodeRedisServer.java | 24 +-- .../redis/internal/statistics/GeodeRedisStats.java | 236 +++-- 3 files changed, 184 insertions(+), 133 deletions(-) create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/statistics/GeodeRedisStatsIntegrationTest.java
[geode] branch develop updated: GEODE-9998: Upgrade Jedis client from 3.6.3 to 4.1.1 (#7340)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 9305169 GEODE-9998: Upgrade Jedis client from 3.6.3 to 4.1.1 (#7340) 9305169 is described below commit 93051691eb5bda1277e901d04c554aa95419f9df Author: Eric Zoerner AuthorDate: Thu Feb 17 14:18:02 2022 -0800 GEODE-9998: Upgrade Jedis client from 3.6.3 to 4.1.1 (#7340) --- .../src/test/resources/expected-pom.xml| 2 +- .../gradle/plugins/DependencyConstraints.groovy| 2 +- .../apache/geode/redis/mocks/MockSubscriber.java | 23 +--- .../geode/redis/UserExpirationDUnitTest.java | 3 +- .../key/AbstractRenameRedirectionsDUnitTest.java | 2 +- .../commands/executor/key/RenameDUnitTest.java | 2 +- .../sortedset/ZAddIncrOptionDUnitTest.java | 8 +- .../commands/executor/sortedset/ZRemDUnitTest.java | 6 +- .../sortedset/ZRemRangeByLexDUnitTest.java | 6 +- .../sortedset/ZRemRangeByRankDUnitTest.java| 24 +++- .../sortedset/ZRemRangeByScoreDUnitTest.java | 6 +- .../auth/AuthWhileServersRestartDUnitTest.java | 7 +- .../StringsKillMultipleServersDUnitTest.java | 9 +- .../AbstractCommandPipeliningIntegrationTest.java | 14 ++- .../cluster/AbstractClusterIntegrationTest.java| 4 +- .../executor/cluster/ClusterIntegrationTest.java | 2 +- .../connection/AbstractEchoIntegrationTest.java| 8 +- .../hash/AbstractHScanIntegrationTest.java | 16 +-- .../hash/AbstractHashesIntegrationTest.java| 2 +- .../key/AbstractExistsIntegrationTest.java | 6 +- .../key/AbstractExpireIntegrationTest.java | 3 +- .../key/AbstractPersistIntegrationTest.java| 3 +- .../executor/key/AbstractScanIntegrationTest.java | 4 +- .../commands/executor/key/ScanIntegrationTest.java | 4 +- .../pubsub/AbstractSubCommandsIntegrationTest.java | 64 +-- .../AbstractSubscriptionsIntegrationTest.java | 6 +- .../server/AbstractHitsMissesIntegrationTest.java | 4 +- .../server/AbstractInfoIntegrationTest.java| 2 +- .../server/AbstractSlowlogIntegrationTest.java | 2 +- .../executor/server/ShutdownIntegrationTest.java | 12 +- .../executor/set/AbstractSScanIntegrationTest.java | 12 +- .../AbstractZInterStoreIntegrationTest.java| 123 +++-- .../sortedset/AbstractZPopMaxIntegrationTest.java | 2 +- .../sortedset/AbstractZPopMinIntegrationTest.java | 2 +- .../AbstractZRangeByScoreIntegrationTest.java | 2 +- .../sortedset/AbstractZRangeIntegrationTest.java | 6 +- .../AbstractZRevRangeByScoreIntegrationTest.java | 8 +- .../AbstractZRevRangeIntegrationTest.java | 7 +- .../sortedset/AbstractZScanIntegrationTest.java| 14 +-- .../AbstractZUnionStoreIntegrationTest.java| 75 ++--- .../string/AbstractBitOpIntegrationTest.java | 2 +- .../string/AbstractBitPosIntegrationTest.java | 2 +- 42 files changed, 254 insertions(+), 257 deletions(-) diff --git a/boms/geode-all-bom/src/test/resources/expected-pom.xml b/boms/geode-all-bom/src/test/resources/expected-pom.xml index 927e660..09bd9b3 100644 --- a/boms/geode-all-bom/src/test/resources/expected-pom.xml +++ b/boms/geode-all-bom/src/test/resources/expected-pom.xml @@ -460,7 +460,7 @@ redis.clients jedis -3.6.3 +4.1.1 xerces diff --git a/buildSrc/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy b/buildSrc/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy index 2633533..9041707 100644 --- a/buildSrc/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy +++ b/buildSrc/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy @@ -172,7 +172,7 @@ class DependencyConstraints implements Plugin { api(group: 'org.springframework.shell', name: 'spring-shell', version: get('springshell.version')) api(group: 'org.testcontainers', name: 'testcontainers', version: '1.15.3') api(group: 'pl.pragmatists', name: 'JUnitParams', version: '1.1.0') -api(group: 'redis.clients', name: 'jedis', version: '3.6.3') +api(group: 'redis.clients', name: 'jedis', version: '4.1.1') api(group: 'xerces', name: 'xercesImpl', version: '2.12.0') api(group: 'xml-apis', name: 'xml-apis', version: '1.4.01') api(group: 'org.junit-pioneer', name: 'junit-pioneer', version: '1.5.0') diff --git a/geode-for-redis/src/commonTes
[geode-benchmarks] branch develop updated: Fix Jedis version to the version defined by benchmarks
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git The following commit(s) were added to refs/heads/develop by this push: new d1ea34e Fix Jedis version to the version defined by benchmarks d1ea34e is described below commit d1ea34e37f8759643e26c429aaf4e2b8ec3247bb Author: Jens Deppe AuthorDate: Fri Feb 18 10:18:32 2022 -0800 Fix Jedis version to the version defined by benchmarks - Develop has moved to Jedis 4.1.1 which requires code changes here. Since benchmark runs against the 'baseline' and develop both just use benchmarks at develop the benchmark code cannot be updated until the baseline is moved beyond the Jedis 4.1.1 change. --- geode-benchmarks/build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/geode-benchmarks/build.gradle b/geode-benchmarks/build.gradle index 53280be..5aed353 100644 --- a/geode-benchmarks/build.gradle +++ b/geode-benchmarks/build.gradle @@ -59,7 +59,9 @@ dependencies { geodeVersion = configurations.geodeVersionResolver.resolvedConfiguration.resolvedArtifacts.find {it.name == 'geode-core'}.moduleVersion.id.version logger.info("Building with Geode ${geodeVersion}.") - implementation platform("org.apache.geode:geode-all-bom:${geodeVersion}") + implementation platform("org.apache.geode:geode-all-bom:${geodeVersion}") { +exclude group: 'redis.clients' + } implementation(project(':harness'))
[geode] branch develop updated (e191407 -> 1fc35af)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from e191407 GEODE-10072: Restore japicmp report (#7383) add 1fc35af GEODE-9947: Add Radish LINDEX command (#7380) No new revisions were added by this update. Summary of changes: .../tools_modules/geode_for_redis.html.md.erb | 3 +- geode-for-redis/README.md | 1 + ...t.java => LIndexNativeRedisAcceptanceTest.java} | 3 +- .../list/AbstractLIndexIntegrationTest.java| 145 + ...grationTest.java => LIndexIntegrationTest.java} | 3 +- .../server/AbstractHitsMissesIntegrationTest.java | 5 + .../redis/internal/commands/RedisCommandType.java | 5 +- .../LIndexExecutor.java} | 34 ++--- .../geode/redis/internal/data/RedisList.java | 18 +++ 9 files changed, 194 insertions(+), 23 deletions(-) copy geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/list/{LLenNativeRedisAcceptanceTest.java => LIndexNativeRedisAcceptanceTest.java} (93%) create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/AbstractLIndexIntegrationTest.java copy geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/{LLenIntegrationTest.java => LIndexIntegrationTest.java} (93%) copy geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/{string/DecrByExecutor.java => list/LIndexExecutor.java} (68%) mode change 100755 => 100644
[geode] branch develop updated (45cbe7f -> b729702)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 45cbe7f GEODE-10063: Correctly set primary queue connection. (#7382) add b729702 GEODE-10083: Fix RedisProxy to correctly process MOVED response (#7394) No new revisions were added by this update. Summary of changes: .../geode/redis/internal/proxy/MovedResponseHandler.java | 10 -- .../redis/internal/proxy/RedisProxyInboundHandler.java | 14 +- .../redis/internal/proxy/RedisProxyOutboundHandler.java| 10 -- 3 files changed, 21 insertions(+), 13 deletions(-)
[geode] branch develop updated (dc1f1ab -> 438a4d4)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from dc1f1ab Initial commit add 438a4d4 GEODE-9949: Implement Radish LPUSHX command (#7397) No new revisions were added by this update. Summary of changes: .../tools_modules/geode_for_redis.html.md.erb | 34 +++ ...t.java => LPushxNativeRedisAcceptanceTest.java} | 2 +- .../list/AbstractLPushIntegrationTest.java | 5 ++- ...est.java => AbstractLPushxIntegrationTest.java} | 50 ++ ...grationTest.java => LPushxIntegrationTest.java} | 2 +- .../server/AbstractHitsMissesIntegrationTest.java | 5 +++ .../redis/internal/commands/RedisCommandType.java | 3 ++ .../commands/executor/list/LPushExecutor.java | 13 -- .../LPushXExecutor.java} | 9 ++-- .../geode/redis/internal/data/NullRedisList.java | 7 ++- .../geode/redis/internal/data/RedisList.java | 7 ++- 11 files changed, 87 insertions(+), 50 deletions(-) copy geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/list/{LLenNativeRedisAcceptanceTest.java => LPushxNativeRedisAcceptanceTest.java} (93%) copy geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/{AbstractLPushIntegrationTest.java => AbstractLPushxIntegrationTest.java} (66%) copy geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/{LIndexIntegrationTest.java => LPushxIntegrationTest.java} (94%) copy geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/{key/PExpireAtExecutor.java => list/LPushXExecutor.java} (83%)
[geode] branch develop updated: GEODE-9950: Add Radish LRANGE command (#7389)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 2cd5d82 GEODE-9950: Add Radish LRANGE command (#7389) 2cd5d82 is described below commit 2cd5d8271357b76e76c584577ae0c214cc5cdc16 Author: Kris10 AuthorDate: Mon Mar 7 08:39:34 2022 -0800 GEODE-9950: Add Radish LRANGE command (#7389) This implements a version of the Redis LRANGE command, which is used for list data types. Associated tests were also added. Given a key, it returns a list of elements in the range (inclusive) for the specified start index and stop index. Both the start and stop indexes are zero based, which starts at the head of the list. Negative indexes start at the tail of the list. LINDEX was modified to use a new method created in this commit. The method converts negative indexes to the corresponding positive index. --- .../tools_modules/geode_for_redis.html.md.erb | 8 +- geode-for-redis/README.md | 1 + .../list/LRangeNativeRedisAcceptanceTest.java} | 42 ++--- .../list/AbstractLRangeIntegrationTest.java| 186 + .../executor/list/LRangeIntegrationTest.java} | 44 + .../server/AbstractHitsMissesIntegrationTest.java | 9 +- .../redis/internal/commands/RedisCommandType.java | 2 + .../commands/executor/list/LRangeExecutor.java | 48 ++ .../geode/redis/internal/data/NullRedisList.java | 6 + .../geode/redis/internal/data/RedisList.java | 76 - 10 files changed, 343 insertions(+), 79 deletions(-) diff --git a/geode-docs/tools_modules/geode_for_redis.html.md.erb b/geode-docs/tools_modules/geode_for_redis.html.md.erb index dce2066..f75daf2 100644 --- a/geode-docs/tools_modules/geode_for_redis.html.md.erb +++ b/geode-docs/tools_modules/geode_for_redis.html.md.erb @@ -188,10 +188,10 @@ Could not connect to Redis at 127.0.0.1:6379: Connection refused | HSETNX | HSTRLEN | HVALS | INCR | | INCRBY | INCRBYFLOAT | INFO **[4]** | KEYS | | LINDEX | LLEN | LOLWUT | LPOP | -| LPUSH | LPUSHX | MGET | MSET | -| MSETNX | PERSIST | PEXPIRE | PEXPIREAT | -| PING | PSETEX | PSUBSCRIBE | PTTL | -| PUBLISH PUBSUB | PUNSUBSCRIBE | RENAME | +| LPUSH | LPUSHX | LRANGE | MGET | +| MSET | MSETNX | PERSIST | PEXPIRE | +| PEXPIREAT | PING | PSETEX | PSUBSCRIBE | +| PTTL | PUBLISH PUBSUB | PUNSUBSCRIBE | RENAME | | RENAMENX | RESTORE | SADD | SCARD | | SDIFF | SDIFFSTORE | SET | SETEX | | SETNX | SETRANGE | SINTER | SINTERSTORE | diff --git a/geode-for-redis/README.md b/geode-for-redis/README.md index 2c954e9..7cd1531 100644 --- a/geode-for-redis/README.md +++ b/geode-for-redis/README.md @@ -183,6 +183,7 @@ Geode for Redis implements a subset of the full Redis command set. - INFO 2 - KEYS - LINDEX +- LRANGE - MGET - MSET - MSETNX diff --git a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisList.java b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/list/LRangeNativeRedisAcceptanceTest.java old mode 100644 new mode 100755 similarity index 52% copy from geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisList.java copy to geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/list/LRangeNativeRedisAcceptanceTest.java index 65006eb..6e4b27f --- a/geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisList.java +++ b/geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/list/LRangeNativeRedisAcceptanceTest.java @@ -11,48 +11,26 @@ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. - * */ +package org.apache.geode.redis.internal.commands.executor.list; -package org.apache.geode.redis.internal.data; - -import java.util.List; +import org.junit.ClassRule; -import org.apache.geode.cache.Region; +import org.apache.geode.redis.NativeRedisClusterTestRule; -class NullRedisList extends RedisList { +public class LRangeNativeRedisAcceptanceTest extends AbstractLRangeIntegrationTest { - NullRedisList() { -super(); - } + @ClassRule + public static NativeRedisClusterTestRule redis = new NativeRedisClusterTestRule(); @Override - public boolean isNull() { -return true; + public int getPort() { +return redis.getExposedPorts().get(0); } @Override - public long lpush(List elementsToAdd, Region region, RedisKey key, - final boolean onlyIfExists) { -if (onlyIfExists) { - return 0; -} - -RedisList newList = new RedisList(); -for (byte[] element : elementsToAdd) { - newList.elementPu