[MCOL-4673] Regression: calShowPartition returns N/A Created: 2021-04-09  Updated: 2021-06-18  Resolved: 2021-05-24

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: 6.1.1
Fix Version/s: 6.1.1

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Sergey Zefirov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
causes MCOL-4766 UPDATE/INSERT in a transaction does n... Closed
Relates
relates to MCOL-2044 Update CPRange max/min for extent doi... Closed
relates to MCOL-4614 calShowPartitions() precision loss fo... Closed

 Description   

If I compile this ColumnStore revision:

commit 47772cff10a094b2e2a1937a397378d4cb25faf0 (HEAD -> develop)
Merge: f33b8605 16002e28
Author: Roman Nozdrin <drrtuy@gmail.com>
Date:   Tue Apr 6 12:44:04 2021 +0300
 
    Merge pull request #1848 from mariadb-AlexeyAntipovsky/MCOL-4573-dev
    
    [MCOL-4573] resize cpimport.bin arg vector as needed

and run this SQL script:

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a DECIMAL(17,1)) ENGINE=ColumnStore;
INSERT INTO t1 VALUES (-8999999999999999.9);
SELECT * FROM t1 WHERE a=0;
SELECT calShowPartitions('t1','a');

in prints the following output:

+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| calShowPartitions('t1','a')                                                                                                                                  |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Part#     Min                           Max                           Status
  0.0.1     -8999999999999999.9           -8999999999999999.9           Enabled |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.002 sec)

Notice, it prints good Min and Max values.

If I compile ColumnStore with the next revision in the history:

commit c1138c4793c39772e73502c945d6ba6102b3aba3 (HEAD -> develop)
Merge: 47772cff 1143e89f
Author: Roman Nozdrin <drrtuy@gmail.com>
Date:   Tue Apr 6 12:46:02 2021 +0300
 
    Merge pull request #1771 from mariadb-SergeyZefirov/MCOL-2044-update-ranges-during-DML

and rerun the same script, it does not print Min/Max values anymore:

+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| calShowPartitions('t1','a')                                                                                                                                  |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Part#     Min                           Max                           Status
  0.0.1     N/A                           N/A                           Enabled |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.002 sec)

I don't know if this change was intentional. Probably not.



 Comments   
Comment by Sergey Zefirov [ 2021-04-20 ]

The problem here is that column's extent is in state "Updating" after an insert operation.

It is not "Valid" and is reported as "N/A" in calShowPartitions().

Comment by Sergey Zefirov [ 2021-04-20 ]

https://github.com/mariadb-SergeyZefirov/mariadb-columnstore-engine/tree/MCOL-4673-Regression-calShowPartition-returns-NA - the code that contains a fix.

I am not sure about the fix, though, so I postpone pull request.

Comment by Sergey Zefirov [ 2021-04-23 ]

Current solution fails columnstore/base.mcs51_cpimport_select_from test (among others, I guess).

Comment by Sergey Zefirov [ 2021-04-23 ]

Right now we have two ways to run MTR: with separate DB server and with, say, system-wide DB server (--extern flag).

We run MTR with --extern flag in CI.

The command line for MTR run with separate server is this: ./mtr --suite=columnstore/basic --skip-test-list=suite/columnstore/basic/failed.def

This run fails a lot of tests but does not skip udf_calshowpartitions. The fix I have in source code right now pass this test.

I reported failure of mcs51_cpimport_select_from test above and it is from this run. It is not a problem with my patch, but with the way MTR runs.

The command line for MTR to run with system-wide server is this: ./mtr --suite=columnstore/basic --extern socket=/var/lib/mysql/mysql.sock --skip-test-list=suite/columnstore/basic/failed.def

This run skips udf_calshowpartitions but pass all other tests.

I will make sure that cpimport exits with proper extent range set. After that, I will create a PR.

Comment by Sergey Zefirov [ 2021-04-27 ]

https://github.com/mariadb-corporation/mariadb-columnstore-engine/pull/1891 - relevant PR.

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