[MDEV-20834] Engine cannot be altered to S3 from MyISAM for a 110Gb table. Created: 2019-06-07  Updated: 2021-02-19

Status: Stalled
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Storage Engine - S3
Affects Version/s: 10.5
Fix Version/s: 10.5

Type: Bug Priority: Major
Reporter: Stepan Patryshev (Inactive) Assignee: Elena Stepanova
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Centos 7 on Hyper-V. SSD.


Issue Links:
Relates
relates to MDEV-19416 Test S3 Storage engine Closed

 Description   

Branch: 10.3-enterprise
Commit: e8fa172cc11366d1c3938295771cbe5184d12c17
Version: 10.3.16-MariaDB

> CREATE TABLE BigTable (id int, b int, PRIMARY KEY (id)) engine=MyISAM
> insert into BigTable select seq,-seq from seq_1_to_99
> insert into BigTable select seq,-seq from seq_100_to_2000000000
Query OK, 1999999901 rows affected (1 hour 28 min 2.370 sec)
Records: 1999999901  Duplicates: 0  Warnings: 0
> select count(*) from BigTable;
| count(*)   |
+------------+
| 2000000000 |
 
ALTER TABLE BigTable engine=s3;
Stage: 1 of 2 'Copy to tmp table'   98.7% of stage done
Stage: 2 of 2 'Repair by sorting'    100% of stage done

The client is hanging with this 'Repair by sorting' last message.
I run another client. And it is also hanging:

> use test;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

The appropriate 'data' directory is about 110Gb size.
Have not found anything related in the logs.



 Comments   
Comment by Elena Stepanova [ 2019-06-08 ]

You must have run out of disk space for the tmp table on your local machine.

Comment by Stepan Patryshev (Inactive) [ 2019-06-08 ]

elenst No. I've monitored very carefully the free space. And creating the tmp table already has finished and there was still a free space.

Comment by Michael Widenius [ 2019-10-15 ]

How long did you wait? Did you try to check what happened on S3 with
shell> aws s3 ls --recursive s3://storage-engine/test

Copying a 110G table can take hours if you have a slow internet line. The S3 protocol is not very efficient...

Comment by Stepan Patryshev (Inactive) [ 2019-10-15 ]

As I remember, I was waiting not less than 2 days. And I have not checked this "aws s3 ls --recursive s3://storage-engine/test".

Comment by Stepan Patryshev (Inactive) [ 2019-10-15 ]

monty sorry, I mixed it up. That time I did not have 2 days actually. It was only about 1 hour.

Generated at Thu Feb 08 09:02:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.