[MDEV-11291] Unable to create an index on a connect table (CSV type) which is bigger than 300MB Created: 2016-11-16 Updated: 2017-10-17 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Connect |
| Affects Version/s: | 10.1.18 |
| Fix Version/s: | 10.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jonny Zhu | Assignee: | Olivier Bertrand |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | connect-engine, index, size | ||
| Description |
|
Hello I am trying to load a big CSV file (bigger than 1GB) into a connect table and create an index for it. I fould if the CSV file is smaller than 200MB, erverything is ok. If the CSV file is bigger than 300MB Another thing I found is that, if you create a connect table with a primary key for a csv file which has not been created on disk, index will also not created on disk even after I insert records into this table. Could you please take a look at this issue? Thank you very much. Jonny Zhu |
| Comments |
| Comment by Jonny Zhu [ 2016-11-16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The steps to reproduce the issue: 1. Prepare the csv file by audit log for test data
2. Repeat the csv file for 1500 times to get a large csv file (>300MB)
3. Create a connect table linked to the big csv file. The `timestamp` colume is the key.
4. Although you can see the index by "show index" statement, but it is not created on disk actually.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2016-11-17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I made another big CSV file from other means. When it was 278M large, an index could be made without problem also it is a fairly long process. But when it was increased to more than 500M, making the index failed. This was due to query time out. What happens then depends on how the client program handles query timeout and also whether it uses transaction. If query timeout is not tested as an error, the definition of the index may be commited but no file being written. Concerning your other problem, I cannot reproduce it:
At this point x.csv does not exist.
The index is made and the files x.csv and x.dnx both exist. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2016-11-17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I made the index successfully on the big table (565M) using the release version of the MariaDB server (previously I was in debug mode). It took 1932 seconds to make it. I had a query timeout set to one hour. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jonny Zhu [ 2016-11-18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you for the reply. But as you can see in the commands and return messages I attached, it was "Query OK", not timeout error that I had. Could you please let me know which version of MariaDB did you tried ? (I am now using 10.1.18 ) Thank you | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2016-11-18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Same one, 10.1.18 on Windows 7 32 bits.
The big difference is that in your example the CREATE TABLE lasted 0 sec! No wonder the index file was not generated. Now why was it not generated? Currently I can't tell not being able to reproduce this. BTW, on which machine and operating system are you running? Note: I used an index, not a primary key, because of duplicate values. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jonny Zhu [ 2016-11-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
0 second means, I think, the index was not created. If some errors happen, I expect some error messages returned by DB server but got nothing. I have this problem on a CentOS7 x64 server. MariaDB was installed by "yum install" command. May I ask you to try the same again on a CentOS system? Thank you Jonny Zhu | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2016-11-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sorry, I have no such system available. Just Windows and Ubuntu. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jonny Zhu [ 2016-11-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I understand that you are unable to reproduce the issue on windows platform. But as you can see the log I attached, this issue is happening at a 100% possiblilty on CentOS7 platform. Coud you please let me know what I can do with it? Any suggestion would be good reference. Jonny | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jonny Zhu [ 2016-12-07 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Has anybody of you a centos enviorment? I guess your team are also supporting MariaDB on CentOS platform, besides windows and ubuntu. And... I just tried, that it tooks no more than 30 min to install a new CenOS system with an empty MariaDB in a VMware / Hyper-V virtual machine. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2017-04-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[Note] may be related to https://jira.mariadb.org/browse/MDEV-12551 |