From 512f022940bf49d6758ab66e5169b0289ea8242c Mon Sep 17 00:00:00 2001 From: kajte <33686434+kajte@users.noreply.github.com> Date: Wed, 13 Dec 2023 00:06:35 +0200 Subject: [PATCH] Add GEOSEARCH to read-only commands #2568 Set GEOSEARCH as read-only command to allow running the command on replicas. Original pull request: #2569 --- .../java/io/lettuce/core/masterreplica/ReadOnlyCommands.java | 2 +- src/main/java/io/lettuce/core/protocol/ReadOnlyCommands.java | 2 +- .../lettuce/core/cluster/ClusterReadOnlyCommandsUnitTests.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/lettuce/core/masterreplica/ReadOnlyCommands.java b/src/main/java/io/lettuce/core/masterreplica/ReadOnlyCommands.java index c76aec3bb6..fbfad489cd 100644 --- a/src/main/java/io/lettuce/core/masterreplica/ReadOnlyCommands.java +++ b/src/main/java/io/lettuce/core/masterreplica/ReadOnlyCommands.java @@ -54,7 +54,7 @@ public static Set getReadOnlyCommands() { enum CommandName { ASKING, BITCOUNT, BITPOS, CLIENT, COMMAND, DUMP, ECHO, EVAL_RO, EVALSHA_RO, EXISTS, // - GEODIST, GEOPOS, GEORADIUS, GEORADIUS_RO, GEORADIUSBYMEMBER, GEORADIUSBYMEMBER_RO, GEOHASH, GET, GETBIT, // + GEODIST, GEOPOS, GEORADIUS, GEORADIUS_RO, GEORADIUSBYMEMBER, GEORADIUSBYMEMBER_RO, GEOSEARCH, GEOHASH, GET, GETBIT, // GETRANGE, HEXISTS, HGET, HGETALL, HKEYS, HLEN, HMGET, HRANDFIELD, HSCAN, HSTRLEN, // HVALS, INFO, KEYS, LINDEX, LLEN, LPOS, LRANGE, SORT_RO, MGET, PFCOUNT, PTTL, // RANDOMKEY, READWRITE, SCAN, SCARD, SCRIPT, // diff --git a/src/main/java/io/lettuce/core/protocol/ReadOnlyCommands.java b/src/main/java/io/lettuce/core/protocol/ReadOnlyCommands.java index 739bdcd8b6..848b1e3448 100644 --- a/src/main/java/io/lettuce/core/protocol/ReadOnlyCommands.java +++ b/src/main/java/io/lettuce/core/protocol/ReadOnlyCommands.java @@ -67,7 +67,7 @@ public static ReadOnlyPredicate asPredicate() { enum CommandName { ASKING, BITCOUNT, BITPOS, CLIENT, COMMAND, DUMP, ECHO, EVAL_RO, EVALSHA_RO, EXISTS, // - GEODIST, GEOPOS, GEORADIUS, GEORADIUS_RO, GEORADIUSBYMEMBER, GEORADIUSBYMEMBER_RO, GEOHASH, GET, GETBIT, // + GEODIST, GEOPOS, GEORADIUS, GEORADIUS_RO, GEORADIUSBYMEMBER, GEORADIUSBYMEMBER_RO, GEOSEARCH, GEOHASH, GET, GETBIT, // GETRANGE, HEXISTS, HGET, HGETALL, HKEYS, HLEN, HMGET, HRANDFIELD, HSCAN, HSTRLEN, // HVALS, INFO, KEYS, LINDEX, LLEN, LPOS, LRANGE, SORT_RO, MGET, PFCOUNT, PTTL, // RANDOMKEY, READWRITE, SCAN, SCARD, SCRIPT, // diff --git a/src/test/java/io/lettuce/core/cluster/ClusterReadOnlyCommandsUnitTests.java b/src/test/java/io/lettuce/core/cluster/ClusterReadOnlyCommandsUnitTests.java index 462575285a..11367bf363 100644 --- a/src/test/java/io/lettuce/core/cluster/ClusterReadOnlyCommandsUnitTests.java +++ b/src/test/java/io/lettuce/core/cluster/ClusterReadOnlyCommandsUnitTests.java @@ -31,7 +31,7 @@ class ClusterReadOnlyCommandsUnitTests { @Test void testCount() { - assertThat(ClusterReadOnlyCommands.getReadOnlyCommands()).hasSize(83); + assertThat(ClusterReadOnlyCommands.getReadOnlyCommands()).hasSize(84); } @Test