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

disable balance data #1058

Merged
merged 1 commit into from
Jan 20, 2022
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
11 changes: 8 additions & 3 deletions docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,23 +476,28 @@

|Syntax|Description|
|-|-|
|`BALANCE LEADER`| Starts a job to balance the distribution of storage leaders across each zone in the current graph space. It returns the job ID.|
<!-- balance-3.1
|`BALANCE IN ZONE [REMOVE <ip>:<port> [,<ip>:<port> ...]]`| Starts a job to balance the distribution of storage partitions in each zone in the current graph space. It returns the job ID. You can use the `REMOVE` option to specify the Storage services that you want to clear for easy maintenance.|
|`BALANCE ACROSS ZONE [REMOVE "zone_name" [,"zone_name" ...]]`| Starts a job to balance the distribution of storage partitions across each zone in the current graph space. It returns the job ID. You can use the `REMOVE` option to specify the zones that you want to clear for easy maintenance.|
|`BALANCE LEADER`| Starts a job to balance the distribution of storage leaders across each zone in the current graph space. It returns the job ID.|
-->


* [Job statements](../3.ngql-guide/18.operation-and-maintenance-statements/4.job-statements.md)

|Syntax|Description|
| -------------------- | ------------------------------------------------------------ |
|`SUBMIT JOB BALANCE IN ZONE`|Starts a job to balance the distribution of storage partitions in each zone in the current graph space.|
|`SUBMIT JOB BALANCE ACROSS ZONE`|Starts a job to balance the distribution of storage partitions across each zone in the current graph space.|
| `SUBMIT JOB COMPACT` | Triggers the long-term RocksDB `compact` operation. |
| `SUBMIT JOB FLUSH` | Writes the RocksDB memfile in the memory to the hard disk. |
| `SUBMIT JOB STATS` | Starts a job that makes the statistics of the current graph space. Once this job succeeds, you can use the `SHOW STATS` statement to list the statistics. |
| `SHOW JOB <job_id>` | Shows the information about a specific job and all its tasks in the current graph space. The Meta Service parses a `SUBMIT JOB` request into multiple tasks and assigns them to the nebula-storaged processes. |
| `SHOW JOBS` | Lists all the unexpired jobs in the current graph space. |
| `STOP JOB` | Stops jobs that are not finished in the current graph space. |
| `RECOVER JOB` | Re-executes the failed jobs in the current graph space and returns the number of recovered jobs. |
<!-- balance-3.1
|`SUBMIT JOB BALANCE IN ZONE`|Starts a job to balance the distribution of storage partitions in each zone in the current graph space.|
|`SUBMIT JOB BALANCE ACROSS ZONE`|Starts a job to balance the distribution of storage partitions across each zone in the current graph space.|
-->

* [Kill queries](../3.ngql-guide/18.operation-and-maintenance-statements/6.kill-query.md)

Expand Down
2 changes: 2 additions & 0 deletions docs-2.0/20.appendix/0.FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,9 @@ Nebula Graph {{ nebula.release }} does not provide any commands or tools to supp

5. Scale out storaged: (The number of replicas must be greater than 1) Prepare the binary and config files of the storaged process in the new host, Modify the config files and add all existing addresses of the metad processes. Then start the new storaged process.

<!-- balance-3.1
You also need to run [Balance Data and Balance leader](../8.service-tuning/load-balance.md) after scaling in/out storaged.
-->

### "After changing the name of the host, the old one keeps displaying `OFFLINE`. What should I do?"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ The `BALANCE` statements support the load balancing operations of the Nebula Gra

!!! compatibility "Legacy version compatibility"

The `BALANCE` commands is changed because the zone feature is added to Nebula Graph version 3.0.0, `BALANCE` commands before version 3.0.0 is not compatible.
The `BALANCE DATA` commands are not supported.

The `BALANCE` statements are listed as follows.

|Syntax|Description|
|:---|:---|
|`BALANCE LEADER`| Starts a job to balance the distribution of storage leaders across each zone in the current graph space. It returns the job ID.|
<!-- balance-3.1
|`BALANCE IN ZONE [REMOVE <ip>:<port> [,<ip>:<port> ...]]`| Starts a job to balance the distribution of storage partitions in each zone in the current graph space. It returns the job ID. You can use the `REMOVE` option to specify the Storage services that you want to clear. The partitions of these services will be moved to other services for easy maintenance.|
|`BALANCE ACROSS ZONE [REMOVE "zone_name" [,"zone_name" ...]]`| Starts a job to balance the distribution of storage partitions across each zone in the current graph space. It returns the job ID. You can use the `REMOVE` option to specify the zones that you want to clear. The partitions of these services will be moved to other services for easy maintenance.|
|`BALANCE LEADER`| Starts a job to balance the distribution of storage leaders across each zone in the current graph space. It returns the job ID.|


!!! note

`REMOVE` can only clear the partitions of the current graph space. If a Storage service has a large number of graph spaces, you need to switch to all different graph spaces to perform the `REMOVE` operation.
-->

For details about how to view, stop, and restart a job, see [Job manager and the JOB statements](4.job-statements.md)。
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The long-term tasks run by the Storage Service are called jobs, such as `COMPACT

All job management commands can be executed only after selecting a graph space.

<!-- balance-3.1
## SUBMIT JOB BALANCE IN ZONE

The `SUBMIT JOB BALANCE IN ZONE` statement starts a job to balance the distribution of storage partitions in each zone in the current graph space. It returns the job ID. You can use the `REMOVE` option to specify the Storage services that you want to clear for easy maintenance.
Expand Down Expand Up @@ -35,6 +36,7 @@ nebula> SUBMIT JOB BALANCE ACROSS ZONE REMOVE "zone1";
| 27 |
+------------+
```
-->

## SUBMIT JOB COMPACT

Expand Down
6 changes: 6 additions & 0 deletions docs-2.0/4.deployment-and-installation/5.zone.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ nebula> SHOW ZONES;

Add the Storage services to an existing zone.

<!-- balance-3.1
!!! note

Use the [BALANCE](../3.ngql-guide/18.operation-and-maintenance-statements/2.balance-syntax.md) command to balance the load after adding the Storage services.
-->

```ngql
ADD HOSTS <ip>:<port> [,<ip>:<port> ...] INTO ZONE "<zone_name>";
Expand Down Expand Up @@ -118,9 +120,11 @@ Merge Storage services in multiple zones into a new zone.

The distribution of partitions will be checked during the merge to prevent different partition replicas from being distributed in the same zone.

<!-- balance-3.1
!!! note

Use the [BALANCE](../3.ngql-guide/18.operation-and-maintenance-statements/2.balance-syntax.md) command to balance the load after Merging the Storage services.
-->

```ngql
MERGE ZONE "<zone_name>" [,"<zone_name>" ...] INTO "<new_zone_name>";
Expand All @@ -136,9 +140,11 @@ MERGE ZONE "default_zone_192.168.10.100_9779","default_zone_192.168.10.101_9779"

Divide Storage services in a zone into multiple new zones.

<!-- balance-3.1
!!! note

Use the [BALANCE](../3.ngql-guide/18.operation-and-maintenance-statements/2.balance-syntax.md) command to balance the load after dividing the Storage services.
-->

```ngql
DIVIDE ZONE "<zone_name>" INTO "<new_zone_name>"(<ip>:<port>) ["<new_zone_name>"(<ip>:<port>) ...];
Expand Down
5 changes: 4 additions & 1 deletion docs-2.0/7.data-security/1.authentication/3.role-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ The privileges of roles and the nGQL statements that each role can use are liste
|Privilege|God |Admin|DBA|User|Guest|Allowed nGQL|
|:---|:---|:---|:---|:---|:---|:---|
|Read space|Y|Y|Y|Y|Y|`USE`, `DESCRIBE SPACE`|
|Write space|Y|||||`CREATE SPACE`, `DROP SPACE`, `CREATE SNAPSHOT`, `DROP SNAPSHOT`, `BALANCE DATA`, `BALANCE DATA STOP`, `BALANCE DATA REMOVE`, `BALANCE LEADER`, `ADMIN`, `CONFIG`, `INGEST`, `DOWNLOAD`, `BUILD TAG INDEX`, `BUILD EDGE INDEX`|
|Read schema|Y|Y|Y|Y|Y|`DESCRIBE TAG`, `DESCRIBE EDGE`, `DESCRIBE TAG INDEX`, `DESCRIBE EDGE INDEX`|
|Write schema|Y|Y|Y|||`CREATE TAG`, `ALTER TAG`, `CREATE EDGE`, `ALTER EDGE`, `DROP TAG`, `DELETE TAG`, `DROP EDGE`, `CREATE TAG INDEX`, `CREATE EDGE INDEX`, `DROP TAG INDEX`, `DROP EDGE INDEX`|
|Write user|Y|||||`CREATE USER`, `DROP USER`, `ALTER USER`|
Expand All @@ -66,6 +65,10 @@ The privileges of roles and the nGQL statements that each role can use are liste
|Write data|Y|Y|Y|Y||`INSERT VERTEX`, `UPDATE VERTEX`, `INSERT EDGE`, `UPDATE EDGE`, `DELETE VERTEX`, `DELETE EDGES`, `DELETE TAG`|
|Show operations|Y|Y|Y|Y|Y|`SHOW`, `CHANGE PASSWORD`|
|Job|Y|Y|Y|Y||`SUBMIT JOB COMPACT`、`SUBMIT JOB FLUSH`、`SUBMIT JOB STATS`、`STOP JOB`、`RECOVER JOB`|
|Write space|Y|||||`CREATE SPACE`, `DROP SPACE`, `CREATE SNAPSHOT`, `DROP SNAPSHOT`, `BALANCE`, `ADMIN`, `CONFIG`, `INGEST`, `DOWNLOAD`, `BUILD TAG INDEX`, `BUILD EDGE INDEX`|
<!-- balance-3.1
|Write space|Y|||||`CREATE SPACE`、`DROP SPACE`、`CREATE SNAPSHOT`、`DROP SNAPSHOT`、`BALANCE ZONE`、`BALANCE LEADER`、`ADMIN`、`CONFIG`、`INGEST`、`DOWNLOAD`、`BUILD TAG INDEX`、`BUILD EDGE INDEX`|
-->

!!! caution

Expand Down
6 changes: 6 additions & 0 deletions docs-2.0/8.service-tuning/load-balance.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

You can use the `BALANCE` statement to balance the distribution of partitions and Raft leaders, or clear some Storage servers for easy maintenance. For details, see [BALANCE](../3.ngql-guide/18.operation-and-maintenance-statements/2.balance-syntax.md).

!!! compatibility "Legacy version compatibility"

The `BALANCE DATA` commands are not supported.

<!-- balance-3.1
!!! danger

The `BALANCE` commands migrates data and balances the distribution of partitions by creating and executing a set of subtasks. **DO NOT** stop any machine in the cluster or change its IP address until all the subtasks finish. Otherwise, the follow-up subtasks fail.
Expand Down Expand Up @@ -126,6 +131,7 @@ To remove the following storage servers.
```ngql
nebula> DROP HOSTS 192.168.10.104:9779,192.168.10.105:9779;
```
-->

## Balance leader distribution

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ On this page, you can select the specified graph space and view its distribution

## Service information

On this page, the information of Storage services will be shown. The parameter description is as follows:

On this page, the information of Storage services will be shown. You can click the **Balance Date** button in the upper right corner to start the task to distribute all partitions in the cluster evenly. The parameter description is as follows:
<!-- balance-3.1
You can click the **Balance Date** button in the upper right corner to start the task to distribute all partitions in the cluster evenly.
-->

| Parameter | Description |
| :--- | :--- |
Expand Down
3 changes: 2 additions & 1 deletion docs-2.0/nebula-dashboard-ent/4.cluster-operator/4.manage.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ On this page, the information of all nodes will be shown, including the cluster

If you click **Stop**/**Restart**, the running task will be stopped instantly, which may cause data inconsistency. It is recommended to perform this operation during the low peak period of the business.


<!-- balance-3.1
## Scale

- On this page, you can **add node** and **import node in batches** quickly, and add **Graph services** and **Storage services** to the existing nodes.
Expand All @@ -43,6 +43,7 @@ In this example, storage services with nodes `192.168.8.143` and `192.168.8.167`
In the **services** below, green indicates services that will be added soon, and red indicates services that will be removed. You can modify the port, HTTP port, and HTTP2 port of the newly added service.

![Scale](../figs/scaling-ds.png)
-->

## Update config

Expand Down
2 changes: 2 additions & 0 deletions docs-2.0/nebula-dashboard-ent/8.faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ Nebula Graph is a distributed graph database that supports dynamic scaling servi

The Metad service stores the metadata of the Nebula Graph database. Once the Metad service fails to function, the entire cluster may break down. Besides, the amount of data processed by the Metad service is not much, so it is not recommended to scale the Metad service. And we directly disabled operating on the Metad service in Dashboard to prevent the cluster from being unavailable due to the misoperation of users.

<!-- balance-3.1
## "What impact will the scaling have on the data?"

- Scale out the Storaged service: Dashboard will create and start the Storaged service on the specified machine, which will not affect the existing data. You can choose to perform `Balance Data` on the `Service information` page or `Balance Leader` on the `Leader` page according to your own needs.

- Scale in the Storaged service: Dashboard will automatically execute `Balance Data Remove` to ensure that the service is stopped after the data partition on the specified service is successfully migrated.

- Scaling the Graphd service will not affect the data.
-->

## "Why Dashboard Enterprise Edition cannot be started?"

Expand Down
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ nav:
- Configure clusters:
- Custom configuration parameters for a Nebula Graph cluster: nebula-operator/8.custom-cluster-configurations/8.1.custom-conf-parameter.md
- Reclaim PVs: nebula-operator/8.custom-cluster-configurations/8.2.pv-reclaim.md
- Balance storage data after scaling out: nebula-operator/8.custom-cluster-configurations/8.3.balance-data-when-scaling-storage.md
#banlance-3.1 notice Exclude - Balance storage data after scaling out: nebula-operator/8.custom-cluster-configurations/8.3.balance-data-when-scaling-storage.md
- Upgrade Nebula Graph clusters: nebula-operator/9.upgrade-nebula-cluster.md
- Connect to Nebula Graph databases: nebula-operator/4.connect-to-nebula-graph-service.md
- Self-healing: nebula-operator/5.operator-failover.md
Expand Down Expand Up @@ -547,6 +547,7 @@ plugins:
- nebula-flink/*
- CHANGELOG.md
- spark-connector/*
- nebula-operator/8.custom-cluster-configurations/8.3.balance-data-when-scaling-storage.md
# Exclude the file with the following file name.
# - abc.md
# Exclude files with regular expressions (regexes)
Expand Down