Skip to content

Commit

Permalink
Detecting schema change (#987)
Browse files Browse the repository at this point in the history
  • Loading branch information
cooper-lzy authored Dec 23, 2021
1 parent 3ef91d3 commit d14d8af
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 49 deletions.
8 changes: 1 addition & 7 deletions docs-2.0/2.quick-start/4.nebula-graph-crud.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ From the **Status** column of the table in the return results, you can see that

!!! caution

Nebula Graph implements the following creation or alteration operations asynchronously in the **next** heartbeat cycle. The operations will not take effect until they finish.
In Nebula Graph, the following `CREATE` or `ALTER` commands are implemented in an async way and take effect in the **next** heartbeat cycle. Otherwise, an error will be returned. To make sure the follow-up operations work as expected, Wait for two heartbeat cycles, i.e., 20 seconds.

* `CREATE SPACE`
* `CREATE TAG`
Expand All @@ -63,12 +63,6 @@ From the **Status** column of the table in the return results, you can see that

The default heartbeat interval is 10 seconds. To change the heartbeat interval, modify the `heartbeat_interval_secs` parameter in the [configuration files](../5.configurations-and-logs/1.configurations/1.configurations.md) for all services.

To make sure the follow-up operations work as expected, take one of the following approaches:

* Run `SHOW` or `DESCRIBE` statements accordingly to check the status of the objects, and make sure the creation or alteration is complete. If it is not, wait a few seconds and try again.

* Wait for two heartbeat cycles, i.e., 20 seconds.

## Create and use a graph space

### nGQL syntax
Expand Down
8 changes: 1 addition & 7 deletions docs-2.0/3.ngql-guide/10.tag-statements/1.create-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ nebula> CREATE TAG IF NOT EXISTS woman(name string, age int, \

## Implementation of the operation

Trying to use a newly created tag may fail because the creation of the tag is implemented asynchronously.

Nebula Graph implements the creation of the tag in the next heartbeat cycle. To make sure the creation is successful, take one of the following approaches:

- Find the new tag in the result of [`SHOW TAGS`](4.show-tags.md). If you cannot, wait a few seconds and try again.

- Wait for two heartbeat cycles, i.e., 20 seconds.
Trying to use a newly created tag may fail because the creation of the tag is implemented asynchronously. To make sure the follow-up operations work as expected, Wait for two heartbeat cycles, i.e., 20 seconds.

To change the heartbeat interval, modify the `heartbeat_interval_secs` parameter in the [configuration files](../../5.configurations-and-logs/1.configurations/1.configurations.md) for all services.
8 changes: 1 addition & 7 deletions docs-2.0/3.ngql-guide/10.tag-statements/3.alter-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ nebula> ALTER TAG t1 COMMENT = 'test1';

## Implementation of the operation

Trying to use a newly altered tag may fail because the alteration of the tag is implemented asynchronously.

Nebula Graph implements the alteration of the tag in the next heartbeat cycle. To make sure the alteration is successful, take one of the following approaches:

- Use [`DESCRIBE TAG`](5.describe-tag.md) to confirm that the tag information is updated. If it is not, wait a few seconds and try again.

- Wait for two heartbeat cycles, i.e., 20 seconds.
Trying to use a newly altered tag may fail because the alteration of the tag is implemented asynchronously. To make sure the follow-up operations work as expected, Wait for two heartbeat cycles, i.e., 20 seconds.

To change the heartbeat interval, modify the `heartbeat_interval_secs` parameter in the [configuration files](../../5.configurations-and-logs/1.configurations/1.configurations.md) for all services.
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ nebula> CREATE EDGE IF NOT EXISTS e1(p1 string, p2 int, p3 timestamp) \

## Implementation of the operation

Trying to use a newly created edge type may fail because the creation of the edge type is implemented asynchronously.

Nebula Graph implements the creation of the edge type in the next heartbeat cycle. To make sure the creation is successful, take the following approaches:

- Find the new edge type in the result of [`SHOW EDGES`](4.show-edges.md). If you cannot, wait a few seconds and try again.

- Wait for two heartbeat cycles, i.e., 20 seconds.
Trying to use a newly created edge type may fail because the creation of the edge type is implemented asynchronously. To make sure the follow-up operations work as expected, Wait for two heartbeat cycles, i.e., 20 seconds.

To change the heartbeat interval, modify the `heartbeat_interval_secs` parameter in the [configuration files](../../5.configurations-and-logs/1.configurations/1.configurations.md) for all services.
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ nebula> ALTER EDGE e1 COMMENT = 'edge1';

## Implementation of the operation

Trying to use a newly altered edge type may fail because the alteration of the edge type is implemented asynchronously.

Nebula Graph implements the alteration of the edge type in the next heartbeat cycle. To make sure the alteration is successful, take one of the following approaches:

- Use [`DESCRIBE EDGE`](5.describe-edge.md) to confirm that the edge type information is updated. If it is not, wait a few seconds and try again.

- Wait for two heartbeat cycles, i.e., 20 seconds.
Trying to use a newly altered edge type may fail because the alteration of the edge type is implemented asynchronously. To make sure the follow-up operations work as expected, Wait for two heartbeat cycles, i.e., 20 seconds.

To change the heartbeat interval, modify the `heartbeat_interval_secs` parameter in the [configuration files](../../5.configurations-and-logs/1.configurations/1.configurations.md) for all services.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ If you must use indexes, we suggest that you:

Keep `--disable_auto_compaction = false` during daily incremental writing.

The newly created index will not take effect immediately. Trying to use a newly created index (such as `LOOKUP` or`REBUILD INDEX`) may fail and return `can't find xxx in the space` because the creation is implemented asynchronously. Nebula Graph implements the creation in the next heartbeat cycle. To make sure the creation is successful, take one of the following approaches:

- Find the new index in the result of [`SHOW TAG/EDGE INDEXES`](2.show-native-indexes.md).

- Wait for two heartbeat cycles, i.e., 20 seconds. To change the heartbeat interval, modify the `heartbeat_interval_secs` in the [configuration files](../../5.configurations-and-logs/1.configurations/1.configurations.md) for all services.
The newly created index will not take effect immediately. Trying to use a newly created index (such as `LOOKUP` or`REBUILD INDEX`) may fail and return `can't find xxx in the space` because the creation is implemented asynchronously. To make sure the follow-up operations work as expected, Wait for two heartbeat cycles, i.e., 20 seconds. To change the heartbeat interval, modify the `heartbeat_interval_secs` in the [configuration files](../../5.configurations-and-logs/1.configurations/1.configurations.md) for all services.

!!! danger

Expand Down
10 changes: 1 addition & 9 deletions docs-2.0/3.ngql-guide/9.space-statements/1.create-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,7 @@ nebula> SHOW CREATE SPACE my_space_4;

!!! caution

Trying to use a newly created graph space may fail because the creation is implemented asynchronously.

Nebula Graph implements the creation in the next heartbeat cycle. To make sure the creation is successful, take one of the following approaches:

- Find the new graph space in the result of [`SHOW SPACES`](3.show-spaces.md) or [`DESCRIBE SPACE`](4.describe-space.md). If you cannot, wait a few seconds and try again.

- Wait for two heartbeat cycles, i.e., 20 seconds.

To change the heartbeat interval, modify the `heartbeat_interval_secs` parameter in the [configuration files](../../5.configurations-and-logs/1.configurations/1.configurations.md) for all services. If the heartbeat interval is too short (i.e., less than 5 seconds), disconnection between peers may happen because of the misjudgment of machines in the distributed system.
Trying to use a newly created graph space may fail because the creation is implemented asynchronously. To make sure the follow-up operations work as expected, Wait for two heartbeat cycles, i.e., 20 seconds. To change the heartbeat interval, modify the `heartbeat_interval_secs` parameter in the [configuration files](../../5.configurations-and-logs/1.configurations/1.configurations.md) for all services. If the heartbeat interval is too short (i.e., less than 5 seconds), disconnection between peers may happen because of the misjudgment of machines in the distributed system.

## Check partition distribution

Expand Down

0 comments on commit d14d8af

Please sign in to comment.