[MCOL-1668] CS doesn't reuse segment files whilst doing cpimport Created: 2018-08-22  Updated: 2018-08-27  Resolved: 2018-08-23

Status: Closed
Project: MariaDB ColumnStore
Component/s: writeengine
Affects Version/s: 1.1.6
Fix Version/s: Icebox

Type: Bug Priority: Minor
Reporter: Roman Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

There was a one varchar(79) column table that was populated with cpimport. Every time I insert 7500000 records. I measured a number of segment files existed in the installation. Then I run DELETE from table_name and measued number of files again. Inserted another 7500000 records and measured the number of segment files. The number monotonically increased. Here is the bash log

MariaDB [test]> create table `cs27`(`o_comment` varchar(79) default null) engine=columnstore default charset=latin1;
Query OK, 0 rows affected (0.86 sec)
 
root@c983d37cec14:/# find /usr/local/mariadb/columnstore/data1 -name 'FILE*' | wc -l
43
 
root@c983d37cec14:/# for i in $(seq 1 5); do cpimport -s '|'  test cs27 /git/orders_rows.tbl; done
 
root@c983d37cec14:/# find /usr/local/mariadb/columnstore/data1 -name 'FILE*' | wc -l
45
 
MariaDB [test]> delete from cs27;
Query OK, 7500000 rows affected (19.31 sec)
 
root@c983d37cec14:/# for i in $(seq 1 5); do cpimport -s '|'  test cs27 /git/orders_rows.tbl; done
 
root@c983d37cec14:/# find /usr/local/mariadb/columnstore/data1 -name 'FILE*' | wc -l
47



 Comments   
Comment by David Hall (Inactive) [ 2018-08-23 ]

This experiment is scewed by the fact that DELETE is non-destructive. So deleting rows does not shrink the segment. It merely marks those rows as unavailable. Deleted space is never recovered in columnstore except by truncate and the partition commands.

Comment by Roman [ 2018-08-23 ]

Read the D.Hall's comment.

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