itwanger / itwanger/toBeBetterJavaer

Redis面渣部分描述有误

Open
#155 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
17.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

首先哨兵选举制度这里中间说的很混乱,应该是哨兵选举了主节点而不是成为了主节点。再说就是心跳包,原话为:

③、候选者收到投票后会统计支持自己的得票数,如果候选者获得了集群中超过半数节点的投票支持(即多数原则),它将成为新的主节点。

新的主节点在确立后,会向其他从节点发送心跳信号,告诉它们自己已经成为主节点,并将其他节点的状态重置为从节点。

应该是
Sentinel 领导者会向选定的从节点发送 SLAVEOF NO ONE 命令,并将其提升为主节点。Sentinel 会向其他从节点发送 SLAVEOF <new-master-ip> <new-master-port> 命令,让它们连接到新的主节点并开始复制数据。

心跳信号是用来做 Sentinel 节点之间的健康检查的,而不是跟从节点做状态重置的。

Contributor guide

No contributing guide indexed for this repository

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 documentation for the quoted Redis Sentinel election and heartbeat passages, then read the surrounding section to confirm its context. Correct the description so Sentinel selects and promotes a replica and reconfigures the other replicas, while heartbeat messages are described as Sentinel health checks; done means the section matches these roles without changing unrelated content.

Written by the indexing model from the issue text.

Assessment

Tech stack
redis
Domain
databases
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.