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

minors #63

Merged
merged 3 commits into from
Jul 21, 2020
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
2 changes: 2 additions & 0 deletions docs/manual-CN/1.overview/2.quick-start/1.get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ nebula> CREATE TAG INDEX player_index_0 on player(name);

上述语句在所有标签为 _player_ 的顶点上为属性 _name_ 创建了一个索引。

**索引会影响写性能**,第一次批量导入的时候,建议先导入数据,再批量重建索引;不推荐带索引批量导入,这样写性能会非常差。
oldLady344 marked this conversation as resolved.
Show resolved Hide resolved

详情参看[索引文档](../../2.query-language/4.statement-syntax/1.data-definition-statements/index.md)

## 增删改查
Expand Down
4 changes: 4 additions & 0 deletions docs/manual-CN/1.overview/2.quick-start/2.FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,7 @@ E0415 22:32:38.949796 15463 MetaDaemon.cpp:215] Init kv failed!
如果已设置 max_edge_returned_per_vertex=10,使用 WHERE 进行过滤时,实际边数量大于 10,此时返回 10 条边,还是所有边?
**Nebula Graph** 先进行 WHERE 条件过滤,如果实际边数量少于 10, 则返回实际边数量。反之,则根据 max_edge_returned_per_vertex 限制返回 10 条边。
### 使用 `FETCH` 返回数据时,有时可以返回数据,有时返回为空
oldLady344 marked this conversation as resolved.
Show resolved Hide resolved
请检查是否在同一个节点启动了两个 storage,并且这两个 storage 配置的端口号相同。假如存在以上情况,请修改其中一个 storage 端口号,然后重新导入数据。
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ schema 索引可用于快速处理图查询。**Nebula Graph** 支持两种类

`CREATE INDEX` 用于为已有 Tag/Edge-type 创建索引。

**注意:索引会影响写性能**,第一次批量导入的时候,建议先导入数据,再批量重建索引;不推荐带索引批量导入,这样写性能会非常差。

### 创建单属性索引

```ngql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ nebula> UPDATE CONFIGS graph:v=1;

```bash
/usr/local/nebula/bin/nebula --addr=127.0.0.1 --port=3699
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ disable_auto_compactions -- 停止写入数据时候的自动 compact,

> 以上参数都可通过 UPDATE CONFIGS 语法进行动态修改,也可以写在本地配置文件中。具体作用和修改是否需要重启请参考RocksDB手册。
### 以上参数可通过命令行如下设置
以上参数可通过命令行如下设置:

```ngql
nebula> UPDATE CONFIGS storage:rocksdb_column_family_options = \
Expand All @@ -117,10 +117,10 @@ nebula> UPDATE CONFIGS storage:rocksdb_db_options = \
nebula> UPDATE CONFIGS storage:max_edge_returned_per_vertex = 10; -- 该参数解释见下文
```

### 可在配置文件中如下设置
可在配置文件中如下设置:

```text
rocksdb_db_options = {"stats_dump_period_sec":"200", "":"false", "write_thread_max_yield_usec":"600"}
rocksdb_db_options = {"stats_dump_period_sec":"200", "write_thread_max_yield_usec":"600"}
rocksdb_column_family_options = {"max_write_buffer_number":"4", "min_write_buffer_number_to_merge":"2", "max_write_buffer_number_to_maintain":"1"}
rocksdb_block_based_table_options = {"block_restart_interval":"2"}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

Nebula Graph KV 基于 RocksDB 的默认 compact 做了定制。**Nebula Graph** 提供两种类型的 compact 和相应的操作方法:

1. 通过 `UPDATE CONFIG disable_auto_compactions=false/true` 启停 compact,调用 RocksDB 默认的 compact,主要目的是在写入时自动进行小规模的 sst 文件合并,以保证短时间内的读速度。通常在日间业务时自动触发;
1. 启动和停止(简称启停) compact,调用 RocksDB 默认的 compact,主要目的是在写入时自动进行小规模的 sst 文件合并,以保证短时间内的读速度。通常在日间业务时自动触发;

```ngql
nebula> UPDATE CONFIG storage:disable_auto_compactions=false/true;
```

2. 通过 `SUBMIT JOB COMPACT` 来主动触发,调用 **Nebula Graph** 自定义的 compact,通常建议在凌晨业务低谷时进行,以完成大规模的 sst 文件合并、TTL 等大规模后台操作。
oldLady344 marked this conversation as resolved.
Show resolved Hide resolved

另外,两种方法的线程数均可通过如下命令调整。日间可以将调整线程数调低,夜间可以增加线程数。
Expand Down
10 changes: 5 additions & 5 deletions docs/manual-CN/5.appendix/sql-ngql.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ GO [[<M> TO] <N> STEPS ] FROM <node_list>

对比项 | SQL | nGQL
-------------------------| ------------------------ | -----------
Create user | CREATE USER | CREATE USER
Drop user | DROP USER | DROP USER
Change password | SET PASSWORD | CHANGE PASSWORD
Grant privilege | GRANT `<priv_type>` ON [object_type] TO `<user>`| GRANT ROLE `<role_type>` ON `<space>` TO `<user>`
Revoke privilege | REVOKE `<priv_type>` ON [object_type] TO `<user>` | REVOKE ROLE `<role_type>` ON `<space>` FROM `<user>`
创建用户 | CREATE USER | CREATE USER
删除用户 | DROP USER | DROP USER
更改密码 | SET PASSWORD | CHANGE PASSWORD
授予权限 | GRANT `<priv_type>` ON [object_type] TO `<user>`| GRANT ROLE `<role_type>` ON `<space>` TO `<user>`
删除权限 | REVOKE `<priv_type>` ON [object_type] TO `<user>` | REVOKE ROLE `<role_type>` ON `<space>` FROM `<user>`

## 数据模型

Expand Down
7 changes: 3 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ nav:
- Create User: manual-CN/3.build-develop-and-administration/4.account-management-statements/create-user-syntax.md
- Drop User: manual-CN/3.build-develop-and-administration/4.account-management-statements/drop-user-syntax.md
- Grant Role: manual-CN/3.build-develop-and-administration/4.account-management-statements/grant-role-syntax.md
- LDAP: manual-EN/3.build-develop-and-administration/4.account-management-statements/LDAP.md
- LDAP: manual-CN/3.build-develop-and-administration/4.account-management-statements/LDAP.md
- Revoke: manual-CN/3.build-develop-and-administration/4.account-management-statements/revoke-syntax.md

- 批量数据管理:
Expand All @@ -185,7 +185,7 @@ nav:
- 负载均衡和数据迁移: manual-CN/3.build-develop-and-administration/5.storage-service-administration/storage-balance.md
- 集群快照: manual-CN/3.build-develop-and-administration/5.storage-service-administration/cluster-snapshot.md
- 长耗时任务管理: manual-CN/3.build-develop-and-administration/5.storage-service-administration/job-manager.md
- Compact: manual-EN/3.build-develop-and-administration/5.storage-service-administration/compact.md
- Compact: manual-CN/3.build-develop-and-administration/5.storage-service-administration/compact.md

- 监控与统计:
# - 接入 Prometheus: manual-CN/3.build-develop-and-administration/7.monitor/0.connect-prometheus.md
Expand All @@ -209,8 +209,7 @@ nav:
- Gremlin & nGQL: manual-CN/5.appendix/gremlin-ngql.md
- SQL & nGQL: manual-CN/5.appendix/sql-ngql.md
#- 升级 Nebula Graph: manual-CN/5.appendix/upgrade-guide.md
# - 下载 PDF:
# - https://oss-cdn.nebula-graph.com.cn/doc/v1.0.0-cn.pdf

- English:
- https://docs.nebula-graph.io/

Expand Down