Currently I am using MySQL NDBCluster 7.3.5. I have created one UNDOFILE hhme.dat with INITIAL_SIZE=200m.
Also one tablespace hhmefep_tbs with DATAFILE hhmefep_tbs.dat having INITIAL_SIZE=500M ENGINE=NDB.
Also the output of query is:
mysql> select FILE_NAME,TOTAL_EXTENTS,FREE_EXTENTS,EXTENT_SIZE, extra from information_schema.FILES where TABLESPACE_NAME='hhmefep_tbs' and FILE_TYPE="DATAFILE";
+-----------------+---------------+--------------+-------------+----------------+
| FILE_NAME | TOTAL_EXTENTS | FREE_EXTENTS | EXTENT_SIZE | extra |
+-----------------+---------------+--------------+-------------+----------------+
| hhmefep_tbs.dat | 500 | 21 | 1048576 | CLUSTER_NODE=1 |
| hhmefep_tbs.dat | 500 | 21 | 1048576 | CLUSTER_NODE=2 |
+-----------------+---------------+--------------+-------------+----------------+
The DDL for creating this DB schema is as given below:
mysql> CREATE LOGFILE GROUP hhme ADD UNDOFILE 'hhme.dat' UNDO_BUFFER_SIZE=16M INITIAL_SIZE=200m ENGINE=NDB;
Query OK, 0 rows affected (9.70 sec)
mysql> CREATE DATABASE hhmefep;
Query OK, 1 row affected (0.05 sec)
mysql> CREATE TABLESPACE hhmefep_tbs ADD DATAFILE 'hhmefep_tbs.dat' USE LOGFILE GROUP hhme INITIAL_SIZE=500M ENGINE=NDB;
Query OK, 0 rows affected (24.30 sec)
[root@mgmtserver ~]$ ndb_mgm -e "all report mem"
Connected to Management Server at: localhost:1186
Node 1: Data usage is 16%(2723 32K pages of total 16384)
Node 1: Index usage is 9%(1605 8K pages of total 16416)
Node 2: Data usage is 16%(2723 32K pages of total 16384)
Node 2: Index usage is 9%(1605 8K pages of total 16416)
Output of query:
mysql> select FILE_NAME, FREE_EXTENTS*EXTENT_SIZE as bytes_free, extra
-> from information_schema.FILES
-> where TABLESPACE_NAME='hhmefep_tbs'
-> and FILE_TYPE="DATAFILE";
+-----------------+------------+----------------+
| FILE_NAME | bytes_free | extra |
+-----------------+------------+----------------+
| hhmefep_tbs.dat | 22020096 | CLUSTER_NODE=1 |
| hhmefep_tbs.dat | 22020096 | CLUSTER_NODE=2 |
+-----------------+------------+----------------+
Database total size is 32MB and all tables are using ENGINE=NDB.
Still I am getting "table is full" error when I perform inserts.
Can anyone point out the issue here since 500MB of tablespace is not yet exhausted.
Why am I getting free_extents = 21 ?
Also one tablespace hhmefep_tbs with DATAFILE hhmefep_tbs.dat having INITIAL_SIZE=500M ENGINE=NDB.
Also the output of query is:
mysql> select FILE_NAME,TOTAL_EXTENTS,FREE_EXTENTS,EXTENT_SIZE, extra from information_schema.FILES where TABLESPACE_NAME='hhmefep_tbs' and FILE_TYPE="DATAFILE";
+-----------------+---------------+--------------+-------------+----------------+
| FILE_NAME | TOTAL_EXTENTS | FREE_EXTENTS | EXTENT_SIZE | extra |
+-----------------+---------------+--------------+-------------+----------------+
| hhmefep_tbs.dat | 500 | 21 | 1048576 | CLUSTER_NODE=1 |
| hhmefep_tbs.dat | 500 | 21 | 1048576 | CLUSTER_NODE=2 |
+-----------------+---------------+--------------+-------------+----------------+
The DDL for creating this DB schema is as given below:
mysql> CREATE LOGFILE GROUP hhme ADD UNDOFILE 'hhme.dat' UNDO_BUFFER_SIZE=16M INITIAL_SIZE=200m ENGINE=NDB;
Query OK, 0 rows affected (9.70 sec)
mysql> CREATE DATABASE hhmefep;
Query OK, 1 row affected (0.05 sec)
mysql> CREATE TABLESPACE hhmefep_tbs ADD DATAFILE 'hhmefep_tbs.dat' USE LOGFILE GROUP hhme INITIAL_SIZE=500M ENGINE=NDB;
Query OK, 0 rows affected (24.30 sec)
[root@mgmtserver ~]$ ndb_mgm -e "all report mem"
Connected to Management Server at: localhost:1186
Node 1: Data usage is 16%(2723 32K pages of total 16384)
Node 1: Index usage is 9%(1605 8K pages of total 16416)
Node 2: Data usage is 16%(2723 32K pages of total 16384)
Node 2: Index usage is 9%(1605 8K pages of total 16416)
Output of query:
mysql> select FILE_NAME, FREE_EXTENTS*EXTENT_SIZE as bytes_free, extra
-> from information_schema.FILES
-> where TABLESPACE_NAME='hhmefep_tbs'
-> and FILE_TYPE="DATAFILE";
+-----------------+------------+----------------+
| FILE_NAME | bytes_free | extra |
+-----------------+------------+----------------+
| hhmefep_tbs.dat | 22020096 | CLUSTER_NODE=1 |
| hhmefep_tbs.dat | 22020096 | CLUSTER_NODE=2 |
+-----------------+------------+----------------+
Database total size is 32MB and all tables are using ENGINE=NDB.
Still I am getting "table is full" error when I perform inserts.
Can anyone point out the issue here since 500MB of tablespace is not yet exhausted.
Why am I getting free_extents = 21 ?