Skip to content

Commit 79e8346

Browse files
authored
properly categorizing EXPIRETIME and PEXPIRETIME (#2593)
* properly categorizing EXPIRETIME and PEXPIRETIME * release notes
1 parent 3ff58cc commit 79e8346

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/ReleaseNotes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Current package versions:
88

99
## Unreleased
1010

11-
No pending unreleased changes.
11+
- 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.
1212

1313
## 2.7.4
1414

src/StackExchange.Redis/Enums/RedisCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ internal static bool IsPrimaryOnly(this RedisCommand command)
272272
case RedisCommand.DEL:
273273
case RedisCommand.EXPIRE:
274274
case RedisCommand.EXPIREAT:
275-
case RedisCommand.EXPIRETIME:
276275
case RedisCommand.FLUSHALL:
277276
case RedisCommand.FLUSHDB:
278277
case RedisCommand.GEOSEARCHSTORE:
@@ -304,7 +303,6 @@ internal static bool IsPrimaryOnly(this RedisCommand command)
304303
case RedisCommand.PERSIST:
305304
case RedisCommand.PEXPIRE:
306305
case RedisCommand.PEXPIREAT:
307-
case RedisCommand.PEXPIRETIME:
308306
case RedisCommand.PFADD:
309307
case RedisCommand.PFMERGE:
310308
case RedisCommand.PSETEX:
@@ -368,6 +366,7 @@ internal static bool IsPrimaryOnly(this RedisCommand command)
368366
case RedisCommand.EVALSHA_RO:
369367
case RedisCommand.EXEC:
370368
case RedisCommand.EXISTS:
369+
case RedisCommand.EXPIRETIME:
371370
case RedisCommand.GEODIST:
372371
case RedisCommand.GEOHASH:
373372
case RedisCommand.GEOPOS:
@@ -402,6 +401,7 @@ internal static bool IsPrimaryOnly(this RedisCommand command)
402401
case RedisCommand.MONITOR:
403402
case RedisCommand.MULTI:
404403
case RedisCommand.OBJECT:
404+
case RedisCommand.PEXPIRETIME:
405405
case RedisCommand.PFCOUNT:
406406
case RedisCommand.PING:
407407
case RedisCommand.PSUBSCRIBE:

0 commit comments

Comments
 (0)