[MCOL-923] select calShowPartitionsByValue wait for eternity, if table is locked Created: 2017-09-14  Updated: 2023-11-21  Resolved: 2018-04-02

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

Type: New Feature Priority: Major
Reporter: Richard Stracke Assignee: David Hall (Inactive)
Resolution: Cannot Reproduce Votes: 0
Labels: None

Sprint: 2018-06, 2018-07

 Description   

select calShowPartitionsByValue should run fast into an error after a defined timewait value,
if table is locked by a concurrent cpimport.

Currently the command waited for eternity and must be killed manually.



 Comments   
Comment by David Hall (Inactive) [ 2018-03-21 ]

calShowPartitions and calShowPartitionsByValue don't attempt to lock the table. All the information needed is in the Extent Map, which isn't ever supposed to be locked.

An experiment running cpimport on lineitem and execution the following works while the table is locked by the cpimport:

MariaDB [tpch1]> select calshowpartitionsbyvalue('lineitem', 'l_shipdate', '1992-01-01', '1999-01-01');
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

calshowpartitionsbyvalue('lineitem', 'l_shipdate', '1992-01-01', '1999-01-01')

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

Part# Min Max Status
0.0.1 1992-01-02 1998-12-01 Enabled
0.1.1 1992-01-02 1998-12-01 Enabled
0.2.1 1992-01-02 1998-12-01 Enabled
0.3.1 1992-01-02 1998-12-01 Enabled

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

Checking the lock before and after shows the lock was on for the duration:
[calpont@srvhall03 bin]$ ./viewtablelock
There is 1 table lock

Table LockID Process PID Session Txn CreationTime State DBRoots
tpch1.lineitem 4 cpimport.bin (pm1) 6366 BulkLoad n/a Wed Mar 21 14:31:08 2018 LOADING 1
[calpont@srvhall03 bin]$ ./viewtablelock
There is 1 table lock

Table LockID Process PID Session Txn CreationTime State DBRoots
tpch1.lineitem 4 cpimport.bin (pm1) 6366 BulkLoad n/a Wed Mar 21 14:31:08 2018 LOADING 1
[calpont@srvhall03 bin]$

Not sure where to go from here without more information.

Comment by David Hall (Inactive) [ 2018-03-22 ]

See notes above. It can't be a table lock that is causing the lockout. How can I reproduce this error?

Comment by David Thompson (Inactive) [ 2018-04-02 ]

Not reproducible

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