Improve INFO command for Sentinel internal failover feature
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 109
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
Redis' Info commands return a lot of information, but only these are required by Sentinel:
For slave:
run_id:4ba98afd1b8655725d9cbe64d9551bde0ceeffa0
role:slave
master_host:127.0.0.1
master_port:6381
master_link_status:down
slave_repl_offset:0
master_link_down_since_seconds:-1
slave_priority:100
slave_read_only:1
replica_announced:1
connected_slaves:0
master_failover_state:no-failover
Master
run_id:5a4dfcf77726cfcda754cbdc0a42d1cec6a7348d
role:master
connected_slaves:1
slave0:ip=127.0.0.1,port=6379,state=online,offset=42,lag=0
master_failover_state:no-failover
Explain:
- master_link_down_since_seconds: now() - last successful ping to master (or last ping received from master)
- master_failover_state: TBU
- master_link_status: current slave cannot contact with master
- slave_read_only: slave only executes read request
- slave_priority: a criteria used when promoting slaves to be new master (TBU)
- slave_repl_offset: TBU
- run_id: unique id of an instance, only null on the first run
- slavex:ip=....,port=...,state=...,offset=...,lag=... information of master about slave x, there can be multiple line like this, but the index of a slave should be consistent between calls
Things to consider: - Should we still use text based protocol and read line by line
- Should these information be displayed in external info command exposed to user's client, or keep it as an internal command
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests. Begin by tracing the INFO command and Sentinel failover handling, then resolve whether the text protocol and external INFO exposure should change; completion requires defining the required fields and their semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, redis
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100