对官方文档提个小建议

对官方文档
https://docs.pingcap.com/zh/tidb/stable/sql-faq#tidb-中删除数据后会立即释放空间吗

中描述的:对于 DELETE 操作 TiDB 的 GC 机制会删除数据,但不会释放空间,而是当后续数据写入 RocksDB 且进行 compact 时对“”空间重新利用“”。建议 改为:而是当后续数据写入 RocksDB 且进行 compact 时释放空间。理由如下
1:前面提到了gc不会释放空间,后面如果描述为空间重新利用有歧义(oracle 段管理就是空间重新利用而不是释放空间)
2:从严谨性上讲:改为 “”释放空间“”前后呼应

可以在 Issues · pingcap/docs · GitHub 这里提交一个 issue 和大家讨论,没有意外的话应该可以调整成你想要的样子。因为改动比较小,还可以在 issue 提出同时再提一个 PR 修正掉这一块儿,社区内达成共识后 PR 可以被合并完成在 TiDB 社区的一次 contribution :clap:

如果对提交 PR 流程不太熟悉,可以先参考 TiDB Dev Guide 的这个章节 Contribute Code - TiDB Development Guide 也可以在这里交流。

Does TiDB release space immediately after deleting data?

None of the DELETE , TRUNCATE and DROP operations release data immediately. For the TRUNCATE and DROP operations, after the TiDB GC (Garbage Collection) time (10 minutes by default), the data is deleted and the space is released. For the DELETE operation, the data is deleted but the space is not released according to TiDB GC. When subsequent data is written into RocksDB and executes COMPACT , the space is reused.

Does TiDB release space immediately after deleting data?

None of the DELETE , TRUNCATE and DROP operations release data immediately. For the TRUNCATE and DROP operations, after the TiDB GC (Garbage Collection) time (10 minutes by default), the data is deleted and the space is released. For the DELETE operation, the data is deleted but the space is not released according to TiDB GC. When subsequent data is written into RocksDB and executes COMPACT , the space is reclaimed.

1 个赞

第一次在https://github.com/pingcap/docs/issues 申请,申请操作时候提示用户名不可用,这要如何处理

能截个图么?是不是 Github 账号登陆的问题?

我这边先提交给 @官网文档小助手 帮忙看一下~

@shaoj 已在 https://github.com/pingcap/docs-cn/pull/7165 中进行修改。

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。