Skip to content

Commit

Permalink
add toss (#1035)
Browse files Browse the repository at this point in the history
  • Loading branch information
cooper-lzy committed Oct 11, 2021
1 parent dc3e360 commit 8e5e453
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ EdgeA_Out和EdgeA_In以方向相反的两条边的形式存在于存储层,二

如EdgeA_Out和EdgeA_In一样,Nebula Graph冗余了存储每条边的信息,导致存储边所需的实际空间翻倍。因为边对应的Key占用的硬盘空间较小,但Value占用的空间与属性值的长度和数量成正比,所以,当边的属性值较大或数量较多时候,硬盘空间占用量会比较大。

如果对边进行操作,为了保证两个键值对的最终一致性,可以开启[TOSS功能](../../5.configurations-and-logs/1.configurations/3.graph-config.md),开启后,会先在正向边所在的分片进行操作,然后在反向边所在分片进行操作,最后返回结果。

### 分片算法

分片策略采用**静态 Hash**的方式,即对点VID进行取模操作,同一个点的所有Tag、出边和入边信息都会存储到同一个分片,这种方式极大地提升了查询效率。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,15 @@ Graph服务提供了两份初始配置文件`nebula-graphd.conf.default`和`nebu
| ------------------- | ---------------- | ------------------------------------------ |
|`enable_authorize` |`false` |用户登录时是否进行身份验证。身份验证详情请参见[身份验证](../../7.data-security/1.authentication/1.authentication.md)|
|`auth_type` |`password` |用户登录的身份验证方式。取值为`password``ldap``cloud`|

## experimental配置

| 名称 | 预设值 | 说明 |
| ------------------- | ------------------------ | ------------------------------------------ |
|`enable_experimental_feature`|`false`|实验性功能开关。可选值为`true``false`。当前支持的实验性功能请参见下文。|

### experimental功能说明

| 名称 | 说明 |
| ------------------- | ------------------------------------------|
|TOSS | TOSS(Transaction on Storage Side)功能,用于保证对边进行`INSERT``UPDATE``UPSERT`操作的最终一致性(因为逻辑上的一条边对应着硬盘上的两个键值对)。暂不支持`DELETE`操作。开启后会增加相关操作的时延约1倍。|

0 comments on commit 8e5e453

Please sign in to comment.