Deleting Shards for an Instance (Distributed)
Scenarios
There may be more than enough DNs in your DB instance after read/write splitting is enabled or redundant business data is cleared. You can delete shards as needed to avoid cost waste. This function is available only for distributed GaussDB instances that are deployed independently.
Precautions
- The scaling duration depends on the amount of data. The default timeout period is seven days. When shards are being deleted, the instance is available, but you are not allowed to perform other operations on the console. If you need to perform any operations, contact customer service.
- When shards are being deleted, existing sessions on the DNs in the deleted shards will be cleared, and some services will be affected. Therefore, delete shards during off-peak hours.
- There must be at least one shard in a DB instance. The storage space of the instance after the deletion must meet and following condition: Used space of the current instance/Number of DNs after the deletion + Maximum capacity of a table/Number of DNs after the deletion) < Read-only threshold (85%) x Disk capacity
- PITR backup is suspended during the deletion and is automatically restored after deletion is complete.
- After the deletion is complete, a full backup is performed automatically.
- DB instances can be scaled in only when they are in the Available state. When shards are being deleted, you can still query and insert data, query services are not interrupted, and the data insertion performance is not affected. The performance of join queries on local tables across node groups during redistribution may be affected.
Procedure
- Log in to the management console.
- Click in the upper left corner and select a region and project.
- Click in the upper left corner of the page and choose .
- On the Instances page, click the name of the target instance.
- On the Basic Information page, click Delete in the Shards field.
Figure 1 Deleting shards
- Select the number of shards to be deleted and click Next.
Figure 2 Deleting shards
- Confirm the information and then click Submit.
By default, a shard contains three replicas (a primary DN and two standby DNs). Each time you delete a shard, three replicas will be deleted.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot