Bug #71342 Alter ONLINE Table REORGAMIZE PARTITION asks for ALGORITHM=INPLACE
Submitted: 10 Jan 2014 14:37 Modified: 16 Jan 2014 9:29
Reporter: Mehmet Onur YALAZI Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:7.3.2 OS:Solaris
Assigned to: CPU Architecture:Any
Tags: alter online, error, ndb

[10 Jan 2014 14:37] Mehmet Onur YALAZI
Description:
I have started a 2 node, 1 node group, 2 partitions cluster and created a database on production. Later on after a long usage we need to add 2 seperate nodes to the cluster with the online data node adding procedure. But while trying to reorganize partitions mysql cluster I get the following error:

ALTER ONLINE TABLE error_notification REORGANIZE PARTITION;

ERROR 1845 (0A000): ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.

But if I create a new table and use online alter or use offline alter with an existing table it works.

My current memory report:

2014/01/05_11:57:53 Current memory usage:
Connected to Management Server at: 172.20.4.94:1186
Node 2: Data usage is 59%(226878 32K pages of total 384000)
Node 2: Index usage is 30%(39170 8K pages of total 128032)
Node 3: Data usage is 59%(229337 32K pages of total 384000)
Node 3: Index usage is 29%(38224 8K pages of total 128032)
Node 12: Data usage is 0%(146 32K pages of total 224000)
Node 12: Index usage is 0%(1 8K pages of total 128032)
Node 13: Data usage is 0%(146 32K pages of total 224000)
Node 13: Index usage is 0%(1 8K pages of total 128032)

How to repeat:
1. Start a 2 node 2 partitions cluster
2. create tables
3. insert data into tables
4. add online 2 new nodes as a new nodegroup
5. Try alter online table reorganize partition.
[16 Jan 2014 9:29] MySQL Verification Team
Hello Mehmet,

Thank you for the report.
I can not repeat described behavior on latest 7.3.3 and with dummy data. 

// Followed http://dev.mysql.com/doc/refman/5.6/en/mysql-cluster-online-add-node-example.html
// Adding MySQL Cluster Data Nodes Online: Detailed Example - 

// Then tried to REORGANIZE ndb tables without any issue.

mysql> ALTER ONLINE TABLE keyvalue2 REORGANIZE PARTITION;
Query OK, 0 rows affected, 1 warning (9.08 sec)
Records: 0  Duplicates: 0  Warnings: 1

mysql> show warnings;
+---------+------+------------------------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                                              |
+---------+------+------------------------------------------------------------------------------------------------------+
| Warning | 1287 | 'ONLINE' is deprecated and will be removed in a future release. Please use ALGORITHM=INPLACE instead |
+---------+------+------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> ALTER TABLE keyvalue3 REORGANIZE PARTITION;
Query OK, 0 rows affected (8.83 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> select version();
+----------------------------------+
| version()                        |
+----------------------------------+
| 5.6.14-ndb-7.3.3-cluster-gpl-log |
+----------------------------------+
1 row in set (0.00 sec)

// This is seen only when trying to convert innodb->ndb

mysql> ALTER ONLINE TABLE keyvalue5 engine=ndb;
ERROR 1845 (0A000): ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.

Could you please try with latest version and let us know if you are still hitting the issue. 

Also, please pass on the exact repeatable test case, data to reproduce.

Thanks,
Umesh
[22 Jan 2014 14:03] Bartek Wójcik
Hello,

I have a similar problem, but I got this error while executing 'Alter ONLINE Table REORGAMIZE PARTITION' after recovery online backup or 'table is full'.

When I was creating fresh (not after recovery online backup) table I didn't get an error and process 'Alter ONLINE Table REORGAMIZE PARTITION' was fine.

I do not know what to do ...
[22 Jan 2014 14:37] Bartek Wójcik
my last post concerned:

mysql-cluster-gpl-7.3.3-linux-glibc2.5-x86_64.tar.gz

and Centos 6.4