How can i get the disk usage of specific table using early version tidb?
Please answer these questions before submitting your issue. Thanks!
-
What did you do? If possible, provide a recipe for reproducing the error. 磁盘占用空间比较大,我们想删除部分数据。 比如 user表、action表分别占用的磁盘空间。
-
What did you expect to see? 找不到查询空间占用的方法。
-
What did you see instead? 无 curl http://{TiDBIP}:10080/tables/{db}/{table}/disk-usage 无效 ,返回HTTP 404
-
What version of TiDB are you using (
tidb-server -Vor runselect tidb_version();on TiDB)?
Release Version: v1.0.6-1-g17c1319 Git Commit Hash: 17c13192136c1f0bf26db6dec994b9f1b43c90f0 Git Branch: release-1.0 UTC Build Time: 2018-01-09 09:07:08
是否因为版本比较早,不提供这个api。 那么,
- 有没有其他方法查询
- 如果没有,需要升级版本的话,是否能不停服升级
- 删除数据的办法,是否delete from table就会释放磁盘空间?
谢谢!
For question 1: no, when we release 1.0, pd don't have api to query disk usage.
For question 2: we can do rolling upgrade. You can use ansible to do this
For question 3: the delete from sql only do a logical deleting. The physical deleting need to wait for tikv compacting. You can do this by tikv-ctl.
@winoros thank you! For answer of question 2:
-
Our cluster contains six nodes: node1:pd,tidb node2:pd,tidb node3:pd node4:tikv node5:tikv node6:tikv Avaliable for rolling upgrade using ansible on control machine?
-
Directly update release 1.0 to 2 ,or update to 1.9 then update to version 2, which one is better?
Thanks again!
updating complete. from 1.0.6 rolling update to 2.0.4. Meet some problem ,and see solution at: https://github.com/pingcap/tidb-ansible/issues/438