Skip to content

Commit

Permalink
Enable Stream commands for read-only routing #1271
Browse files Browse the repository at this point in the history
XINFO, XLEN, XPENDING, XRANGE, XREVRANGE, and XREAD can now be issued to replicas.
  • Loading branch information
mp911de committed Apr 23, 2020
1 parent 2c2f608 commit 7fbf9cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/main/java/io/lettuce/core/cluster/ReadOnlyCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ enum CommandName {
HVALS, INFO, KEYS, LINDEX, LLEN, LRANGE, MGET, PFCOUNT, PTTL, //
RANDOMKEY, READWRITE, SCAN, SCARD, SCRIPT, //
SDIFF, SINTER, SISMEMBER, SMEMBERS, SRANDMEMBER, SSCAN, STRLEN, //
SUNION, TIME, TTL, TYPE, ZCARD, ZCOUNT, ZLEXCOUNT, ZRANGE, //
SUNION, TIME, TTL, TYPE, //
XINFO, XLEN, XPENDING, XRANGE, XREVRANGE, XREAD, //
ZCARD, ZCOUNT, ZLEXCOUNT, ZRANGE, //
ZRANGEBYLEX, ZRANGEBYSCORE, ZRANK, ZREVRANGE, ZREVRANGEBYLEX, ZREVRANGEBYSCORE, ZREVRANK, ZSCAN, ZSCORE, //

// Pub/Sub commands are no key-space commands so they are safe to execute on replica nodes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ enum CommandName {
HVALS, INFO, KEYS, LINDEX, LLEN, LRANGE, MGET, PFCOUNT, PTTL, //
RANDOMKEY, READWRITE, SCAN, SCARD, SCRIPT, //
SDIFF, SINTER, SISMEMBER, SMEMBERS, SRANDMEMBER, SSCAN, STRLEN, //
SUNION, TIME, TTL, TYPE, ZCARD, ZCOUNT, ZLEXCOUNT, ZRANGE, //
SUNION, TIME, TTL, TYPE, //
XINFO, XLEN, XPENDING, XRANGE, XREVRANGE, XREAD, //
ZCARD, ZCOUNT, ZLEXCOUNT, ZRANGE, //
ZRANGEBYLEX, ZRANGEBYSCORE, ZRANK, ZREVRANGE, ZREVRANGEBYLEX, ZREVRANGEBYSCORE, ZREVRANK, ZSCAN, ZSCORE,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ReadOnlyCommandsUnitTests {

@Test
void testCount() {
assertThat(ReadOnlyCommands.getReadOnlyCommands()).hasSize(70);
assertThat(ReadOnlyCommands.getReadOnlyCommands()).hasSize(76);
}

@Test
Expand Down

0 comments on commit 7fbf9cb

Please sign in to comment.