Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 4.storage-service.md #950

Merged
merged 1 commit into from
Sep 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ pId = vid % numParts + 1;

Raft 多副本的方式与 HDFS 多副本的方式是不同的,Raft 基于“多数派”投票,因此副本数量不能是偶数。

<!--
Listener:这是一种特殊的 Raft 角色,并不参与投票,也不能用于多副本的数据一致性。在Nebula Graph中,其作用是从 Leader 读取 Raft-wal,并向ElasticSearch集群同步。
-->

### Multi Group Raft

Expand All @@ -228,13 +230,15 @@ Nebula Graph中,每个分片都是串行写日志,为了提高吞吐,写

例如无锁CAS操作需要之前的WAL全部提交后才能执行,如果一个批量写入的WAL里包含了CAS类型的WAL,就需要拆分成粒度更小的几个组,还要保证这几组WAL串行提交。

<!--
### Listener 角色

Listener 角色的存在主要是为了应对**扩容**,扩容时新增的机器需要很长时间去同步数据,如果以 follower 角色同步数据,会导致整个集群的高可用性下降。

新增Listener角色后,会写入command类型的WAL,leader在写WAL时如果发现有`add learner`的command,会将learner加入自己的peers,并将它标记为Listener,在统计多数派的时候,不会算上Listener,但是日志还是会照常发送给它们,Listener本身也不会主动发起选举。

Raft listener进程还可以从Leader获取数据后,然后将它们写入Elasticsearch集群,以便实现全文搜索。详情请参见[部署Raft Listener](../../4.deployment-and-installation/6.deploy-text-based-index/3.deploy-listener.md)。
-->

### leader切换(Transfer Leadership)

Expand Down