Bug #47131 Impossible to get extent data_free for table/partition
Submitted: 4 Sep 2009 10:57 Modified: 7 Sep 2009 14:52
Reporter: Jonas Oreland Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Disk Data Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.3 OS:Any
Assigned to: Jonas Oreland CPU Architecture:Any

[4 Sep 2009 10:57] Jonas Oreland
Description:
Currently it is impossible to find out how much disk space allocated to a table(fragment) that is currently free.

It's not available for other fragments, but can be used by owning fragment.

How to repeat:
.

Suggested fix:
The patch adds 2 new pseudo columns (that I added to ndb_desc)

-- Per partition info --
Partition       Row count       Commit count    Frag fixed memory       Frag varsized memory    Extent_space    Free extent_space
0               99383           99383           4423680                 0                       26214400        567552

This means that table has allocated 26214400 from tablespace, and 567552 bytes of those are free.

Note: this is a *per table* property (actually per fragment),  and will not show up in INFORMATION_SCHEMA.FILES
      (since the 567552 bytes is not available for inserts from any other table (fragment))

---

Possibly they could also be exposed in mysqld...unsure about where though
[4 Sep 2009 11:01] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/82447

3032 Jonas Oreland	2009-09-04
      ndb - bug#47131 - add pseudo columns for extent space/free space
[4 Sep 2009 11:44] Bugs System
Pushed into 5.1.37-ndb-7.0.8 (revid:jonas@mysql.com-20090904113338-65p55dyr4v62k5rg) (version source revid:jonas@mysql.com-20090904113338-65p55dyr4v62k5rg) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[4 Sep 2009 11:44] Bugs System
Pushed into 5.1.35-ndb-7.1.0 (revid:jonas@mysql.com-20090904113937-h018xnx1ynmbnk5a) (version source revid:jonas@mysql.com-20090904113937-h018xnx1ynmbnk5a) (merge vers: 5.1.35-ndb-7.1.0) (pib:11)
[4 Sep 2009 11:45] Bugs System
Pushed into 5.1.37-ndb-6.3.27 (revid:jonas@mysql.com-20090904110123-8qk0tj3f4z4eap9g) (version source revid:jonas@mysql.com-20090904110123-8qk0tj3f4z4eap9g) (merge vers: 5.1.37-ndb-6.3.27) (pib:11)
[7 Sep 2009 14:52] Jon Stephens
Documented feature addition in the NDB-6.3.27 and 7.0.8 changelogs as follows:

        Two new columns have been added to the output of ndb_desc to make 
        it possible to determine how much of the disk space allocated to a 
        given table or fragment remains free. (This information is not 
        available from the INFORMATION_SCHEMA.FILES table, since the FILES 
        table applies only to Disk Data files.) For more information, see 
        "ndb_desc — Describe NDB Tables".

Also updated ndb_desc documentation and Cluster Roadmap section.