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

Optimize DROP SPACE note #2002

Merged
merged 1 commit into from
Jul 22, 2022
Merged
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
4 changes: 2 additions & 2 deletions docs-2.0/3.ngql-guide/9.space-statements/5.drop-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

!!! note

可以通过修改 Storage 服务配置文件中`auto_remove_invalid_space`的值为`false`,使`DROP SPACE`语句仅删除指定的逻辑图空间而保留硬盘上的所有数据。详情参见 [Storage 服务配置](../../5.configurations-and-logs/1.configurations/4.storage-config.md)。
`DROP SPACE`是否删除图空间对应的硬盘数据由 Storage 配置参数 auto_remove_invalid_space 决定。auto_remove_invalid_space 的默认值为`true`,表示会删除数据。如需在删除逻辑图空间时保留硬盘数据,将 auto_remove_invalid_space 的值修改为`false`。详情参见 [Storage 服务配置](../../5.configurations-and-logs/1.configurations/4.storage-config.md)。

## 前提条件

Expand Down Expand Up @@ -32,4 +32,4 @@ DROP SPACE [IF EXISTS] <graph_space_name>;

问:执行`DROP SPACE`语句删除图空间后,为什么磁盘的大小没变化?

答:如果使用 3.1.0 之前版本的 Nebula Graph, `DROP SPACE`语句仅删除指定的逻辑图空间,不会删除硬盘上对应图空间的目录和文件。如需删除硬盘上的数据,需手动删除相应文件的路径,文件路径为`<nebula_graph_install_path>/data/storage/nebula/<space_id>`。其中`<space_id>`可以通过`DESCRIBE SPACE {space_name}`查看。
答:如果使用 3.1.0 之前版本的 Nebula Graph, `DROP SPACE`语句仅删除指定的逻辑图空间,不会删除硬盘上对应图空间的目录和文件。如需删除硬盘上的数据,需手动删除相应文件的路径,文件路径为`<nebula_graph_install_path>/data/storage/nebula/<space_id>`。其中`<space_id>`可以通过`DESCRIBE SPACE {space_name}`查看。