StackExchange / StackExchange/StackExchange.Redis

Still hitting RedisCommandException for "Command cannot be issued to a replica: UNLINK"

Open
#2,890 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.2k
Forks
1.6k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

Hi folks,

Our team previously opened an issue surrounding RedisCommandExceptions for "Command cannot be issued to a replica" - https://github.com/StackExchange/StackExchange.Redis/issues/2016

I believe we've taken the version with the fix (we're using 2.7.17, and looks like that fix was in 2.6.66), however, we still end up getting noise from this exception. As mentioned in the previous issue, this is a reasonable error, but we are not intentionally targeting a replica, we're likely being exposed to the low-level details of the failover that is occurring.

At least from our perspective, having the exception type changed would be super useful here, as we expect valid (semantic) commands from us should not be RedisCommandExceptions.

As previously, we're certainly open to suggestions or other fixes here!

Cheers,
Dylan

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing this report with issue #2016 and reproducing the UNLINK failure during a Redis failover. Trace how the replica command error is classified, then verify that the resulting exception type distinguishes an internal failover condition from an intentionally targeted replica command.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, redis
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.