From dc6aa05d056a3bb4888367ac9ac426b4a12f2340 Mon Sep 17 00:00:00 2001 From: slorello89 Date: Thu, 9 Nov 2023 09:43:55 -0500 Subject: [PATCH 1/2] properly categorizing EXPIRETIME and PEXPIRETIME --- src/StackExchange.Redis/Enums/RedisCommand.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/StackExchange.Redis/Enums/RedisCommand.cs b/src/StackExchange.Redis/Enums/RedisCommand.cs index 884114139..728b88a76 100644 --- a/src/StackExchange.Redis/Enums/RedisCommand.cs +++ b/src/StackExchange.Redis/Enums/RedisCommand.cs @@ -272,7 +272,6 @@ internal static bool IsPrimaryOnly(this RedisCommand command) case RedisCommand.DEL: case RedisCommand.EXPIRE: case RedisCommand.EXPIREAT: - case RedisCommand.EXPIRETIME: case RedisCommand.FLUSHALL: case RedisCommand.FLUSHDB: case RedisCommand.GEOSEARCHSTORE: @@ -304,7 +303,6 @@ internal static bool IsPrimaryOnly(this RedisCommand command) case RedisCommand.PERSIST: case RedisCommand.PEXPIRE: case RedisCommand.PEXPIREAT: - case RedisCommand.PEXPIRETIME: case RedisCommand.PFADD: case RedisCommand.PFMERGE: case RedisCommand.PSETEX: @@ -368,6 +366,7 @@ internal static bool IsPrimaryOnly(this RedisCommand command) case RedisCommand.EVALSHA_RO: case RedisCommand.EXEC: case RedisCommand.EXISTS: + case RedisCommand.EXPIRETIME: case RedisCommand.GEODIST: case RedisCommand.GEOHASH: case RedisCommand.GEOPOS: @@ -402,6 +401,7 @@ internal static bool IsPrimaryOnly(this RedisCommand command) case RedisCommand.MONITOR: case RedisCommand.MULTI: case RedisCommand.OBJECT: + case RedisCommand.PEXPIRETIME: case RedisCommand.PFCOUNT: case RedisCommand.PING: case RedisCommand.PSUBSCRIBE: From 8243d39d65acb387fdff555da12c6d6cbae3374b Mon Sep 17 00:00:00 2001 From: slorello89 Date: Thu, 9 Nov 2023 09:54:59 -0500 Subject: [PATCH 2/2] release notes --- docs/ReleaseNotes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ReleaseNotes.md b/docs/ReleaseNotes.md index 3ed8f7de6..36d5e7991 100644 --- a/docs/ReleaseNotes.md +++ b/docs/ReleaseNotes.md @@ -8,7 +8,7 @@ Current package versions: ## Unreleased -No pending unreleased changes. +- Fix [#2593](https://github.com/StackExchange/StackExchange.Redis/pull/2593): `EXPIRETIME` and `PEXPIRETIME` miscategorized as `PrimaryOnly` commands causing them to fail when issued against a read-only replica. ## 2.7.4