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 1.create-space.md #1872

Merged
merged 1 commit into from
Jan 30, 2023
Merged

Update 1.create-space.md #1872

merged 1 commit into from
Jan 30, 2023

Conversation

whitewum
Copy link
Contributor

What is changed, added or deleted? (Required)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

@@ -25,7 +25,7 @@ CREATE SPACE [IF NOT EXISTS] <graph_space_name> (
|`<graph_space_name>`|Uniquely identifies a graph space in a NebulaGraph instance. The name of the graph space starts with a letter, supports 1 to 4 bytes UTF-8 encoded characters, such as English letters (case-sensitive), digits, and Chinese characters, but does not support special characters except underscores. To use special characters or reserved keywords as identifiers, quote them with backticks. For more information, see [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md).|
|`partition_num`|Specifies the number of partitions in each replica. The suggested value is 20 times (2 times for HDD) the number of the hard disks in the cluster. For example, if you have three hard disks in the cluster, we recommend that you set 60 partitions. The default value is 100.|
|`replica_factor`|Specifies the number of replicas in the cluster. The suggested number is 3 in a production environment and 1 in a test environment. The replica number must be an **odd number** for the need of quorum-based voting. The default value is 1.|
|`vid_type`|A required parameter. Specifies the VID type in a graph space. Available values are `FIXED_STRING(N)` and `INT64`. `INT` equals to `INT64`. <br>``FIXED_STRING(<N>)` specifies the VID as a string, while `INT64` specifies it as an integer. `N` represents the maximum length of the VIDs. If you set a VID that is longer than `N` bytes, NebulaGraph throws an error.|
|`vid_type`|A required parameter. Specifies the VID type in a graph space. Available values are `FIXED_STRING(N)` and `INT64`. `INT` equals to `INT64`. <br>``FIXED_STRING(<N>)` specifies the VID as a string, while `INT64` specifies it as an integer. `N` represents the maximum length of the VIDs. If you set a VID that is longer than `N` bytes, NebulaGraph throws an error. Note, for UTF-8 chars, the length may vary in different cases, i.e. a UTF-8 Chinese char is 3 byte, this means 11 Chinese chars(length-33) will exeed a FIXED_STRING(32) vid defination.|
Copy link
Contributor

@randomJoe211 randomJoe211 Jan 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the length of a UTF-8 character may vary. For example, a UTF-8 Chinese character takes 3 bytes, therefore 11 Chinese characters take 33 bytes and will exceed the limit of a FIXED_STRING(32) VID definition.

@cooper-lzy cooper-lzy merged commit 66a2580 into master Jan 30, 2023
@cooper-lzy cooper-lzy deleted the whitewum-patch-1 branch January 30, 2023 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants