[MCOL-4397] calgetshowpartitions fails if MDB started before MCS Created: 2020-11-18 Updated: 2021-02-01 Resolved: 2020-11-30 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | MDB Plugin |
| Affects Version/s: | 5.4.3 |
| Fix Version/s: | 6.1.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | David Hall (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
See working_tpch1_comparelogonly/misc/calshowpartitions.sql If Server is running and columnstore is started, the calgetshowpartitions uses an out of date shared memory segment for extent map. It may get the wrong answer or will throw a generic error if the requested shm segment doesn't exist. |
| Comments |
| Comment by David Hall (Inactive) [ 2020-11-19 ] | ||||||||||
|
QA: Start columnstore and do some stuff.
Restart columnstore while leaving MDB running: Now try It may work. Probably not.
OR
Depending on how shared memory got mapped by the system that run. | ||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-11-23 ] | ||||||||||
|
Build tested: 5.4.3-1 Could not reproduce this issue using the scenario in the ticket, but reproduced as the following: After truncating a table, select count is correctly return 0 rows, but calshowpartitionsbyvalue() returned stats before the truncate statement. MariaDB [mytest]> select calshowpartitionsbyvalue(schema(), 'lineitem', 'l_orderkey', '0', '60000000');
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- MariaDB [mytest]> select count
----------
---------- MariaDB [mytest]> truncate lineitem; MariaDB [mytest]> select calshowpartitionsbyvalue(schema(), 'lineitem', 'l_orderkey', '0', '60000000');
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- MariaDB [mytest]> select count
----------
---------- MariaDB [mytest]> select calshowpartitionsbyvalue(schema(), 'lineitem', 'l_orderkey', '0', '60000000');
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-11-23 ] | ||||||||||
|
Builds tested: 5.5.1 (Drone 1151), 6.1.0 (Drone 1176) The issue has been fixed. MariaDB [mytest]> select calshowpartitionsbyvalue(schema(), 'lineitem', 'l_orderkey', '0', '60000000');
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- MariaDB [mytest]> select count
----------
---------- MariaDB [mytest]> truncate lieneitem; MariaDB [mytest]> select calshowpartitionsbyvalue(schema(), 'lineitem', 'l_orderkey', '0', '60000000');
----------
---------- | ||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-11-30 ] | ||||||||||
|
Closed per test result in my last comment. |