[MCOL-1005] Multiple cpimports may result in count(*) being wrong Created: 2017-11-02  Updated: 2019-07-10  Resolved: 2019-07-10

Status: Closed
Project: MariaDB ColumnStore
Component/s: PrimProc
Affects Version/s: 1.1.0
Fix Version/s: Icebox

Type: Bug Priority: Critical
Reporter: David Hall (Inactive) Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None

Issue Links:
Relates
relates to MCOL-1028 sum(colname) is giving different valu... Closed
relates to MCOL-1037 Race condition in FIFO buffer Closed
Epic Link: ColumnStore Compatibility Improvements

 Description   

This may or may not be an edge case. Much more testing with various scenarios needs to done.

After running the following multiple times:

cpimport tpch1 partsupp -s '|' '/home/calpont/partsupp.tbl'
where partsupp.tbl is a 10g generated file,

we can get erroneous numbers for count. This doesn't always happen. It has been observed in both compressed and uncompressed tables. The count, when incorrect, is always smaller than the actual count and is underreported by a multiple of 2048. Restarting the system after the count is reported incorrectly corrects the issue.

The phenomenon has been seen using various load sequences, but the most consistent sequence that breaks it is:

Using uncompressed table, single user, 4 dbroots with partsupp.tbl a generated 10g file.

MariaDB [tpch1]> truncate table partsupp;

cpimport tpch1 partsupp -s '|' '/home/calpont/partsupp.tbl'

MariaDB [tpch1]> select idbDBRoot(ps_partkey) dbroot, idbExtentId(ps_partkey) extent, count from partsupp group by dbroot, extent order by dbroot, extent;
------------------------

dbroot extent count

------------------------

4 13304832 8000000

------------------------
1 row in set (1.35 sec)

cpimport tpch1 partsupp -s '|' '/home/calpont/partsupp.tbl'

MariaDB [tpch1]> select count from partsupp;
----------

count

----------

15997952

----------
1 row in set (0.70 sec)


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