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

hide-storage-cache-related-content #2521

Merged
merged 1 commit into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
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 @@ -247,10 +247,17 @@ leader 切换对于负载均衡至关重要,当把某个分片从一台机器

为了避免脑裂,当一个 Raft group 的成员发生变化时,需要有一个中间状态,该状态下新旧 group 的多数派需要有重叠的部分,这样就防止了新的 group 或旧的 group 单方面做出决定。为了更加简化,Diego Ongaro 在自己的博士论文中提出每次只增减一个 peer 的方式,以保证新旧 group 的多数派总是有重叠。NebulaGraph 也采用了这个方式,只不过增加成员和移除成员的实现有所区别。具体实现方式请参见 Raft Part class 里 addPeer/removePeer 的实现。

<!-- open after fully tested

{{ent.ent_begin}}
## 缓存

由于 RocksDB 本身的缓存管理存在限制,无法按需缓存点或边,所以 NebulaGraph 自行实现了 Storage 缓存管理,可以更自由地设置缓存大小、内容等。详情参见 [storage cache 配置](../../5.configurations-and-logs/1.configurations/4.storage-config.md)。

用户可以通过 cURL 命令`curl "http://[storaged IP]:[http port]/cache?stats"`查询缓存数据信息。

{{ent.ent_end}} -->

## 与 HDFS 的区别

Storage 服务基于 Raft 协议实现的分布式架构,与 HDFS 的分布式架构有一些区别。例如:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ rocksdb options 配置的格式为`{"<option_name>":"<option_value>"}`,多个

{{ ent.ent_begin }}

<!-- open after being fully tested

## storage cache 配置

!!! enterpriseonly
Expand All @@ -190,7 +192,7 @@ rocksdb options 配置的格式为`{"<option_name>":"<option_value>"}`,多个
| `vertex_item_ttl` | `300` | 点缓存条目的有效时间。单位:秒。 |
| `enable_negative_pool` | `false`| 是否添加消极缓存池(消极缓存池表示 Key 不存在于数据库中的数据缓存池)。仅当`enable_storage_cache`为`true`时有效。 |
| `negative_pool_capacity` | `50` | 消极缓存池的大小。 单位:兆字节。 |
| `negative_item_ttl` | `300` | 消极缓存条目的有效时间。单位:秒。 |
| `negative_item_ttl` | `300` | 消极缓存条目的有效时间。单位:秒。 | -->

## Black box 配置

Expand Down