tidb icon indicating copy to clipboard operation
tidb copied to clipboard

How can i get the disk usage of specific table using early version tidb?

Open calmzealA opened this issue 8 years ago • 3 comments

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error. 磁盘占用空间比较大,我们想删除部分数据。 比如 user表、action表分别占用的磁盘空间。

  2. What did you expect to see? 找不到查询空间占用的方法。

  3. What did you see instead? 无 curl http://{TiDBIP}:10080/tables/{db}/{table}/disk-usage 无效 ,返回HTTP 404

  4. What version of TiDB are you using (tidb-server -V or run select 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。 那么,

  1. 有没有其他方法查询
  2. 如果没有,需要升级版本的话,是否能不停服升级
  3. 删除数据的办法,是否delete from table就会释放磁盘空间?

谢谢!

calmzealA avatar May 15 '18 08:05 calmzealA

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 avatar May 15 '18 11:05 winoros

@winoros thank you! For answer of question 2:

  1. 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?

  2. Directly update release 1.0 to 2 ,or update to 1.9 then update to version 2, which one is better?

Thanks again!

calmzealA avatar May 16 '18 13:05 calmzealA

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

calmzealA avatar Jun 25 '18 02:06 calmzealA