StackExchange / StackExchange/StackExchange.Redis

Design issue - DemandMaster doesn't do what people want it to do

Open
#2,935 7 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

An observation, from dealing with user questions:

What people want DemandMaster to do for them: "make sure they always actually send the command to the master, and they never see the error about writing to slave"

What it actually does: "throw an error if SE.redis guesses they are about to talk to the replica" - sometimes incorrectly, because SE.redis cached the server state.

Maybe there's an implementation which could, avoid the 'incorrectly because SE.redis cached the server state" bug?

Or maybe DemandMaster flag should just be removed, since it basically only makes things fail more often?

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

Search the repository for DemandMaster and the SE.redis server-state caching and replica checks. First determine whether the cached state causes false replica errors, then clarify whether the intended outcome is reliable master routing or removal of the flag; the issue does not define a single accepted behavior or name tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, redis
Domain
databases
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.