Saturday, March 21, 2020

Clearing table locks in MariaDB ColumnStore (MCS)

If you encounter the following error running MCS:

Internal error: CAL0009: Truncate table failed:  IDB-2009: Unable to perform the cpimport operation because 30084 with PID -1 is currently holding the table lock for session .  

It's due to locks placed on the objects.  Use the following command to view locked objects in MCS:

$ /usr/local/mariadb/columnstore/bin/viewtablelock

 There are 3 table locks

 Table                                   LockID  Process   PID    Session   Txn    CreationTime              State    DBRoots  
 db.table1  159107  DMLProc   43294  614       79082  Thu Mar 19 03:40:37 2020  LOADING  1        
 db.table2            159120  DMLProc   43294  602       79085  Thu Mar 19 05:00:43 2020  LOADING  1        
 db2.table3      159129  cpimport  30084  BulkLoad  n/a    Thu Mar 19 05:15:53 2020  LOADING  1        

Now that you have the list of locked objects, clear the table locks by LockID:

$ /usr/local/mariadb/columnstore/bin/cleartablelock 159129
Rolling back and clearing table lock for table db2.table3; table lock 159129

Sending rollback request to PM1...
Successful rollback response from PM1
Sending cleanup request to PM1...
Successful cleanup response from PM1

Table lock 159129 for table db2.table3 is cleared.



9 comments:

brijesh kumar said...

Get free shipping on qualified led shower lights Recessed Lighting or Buy Online Pick Up in Store today in the Lighting Department.

Amit Kumar Chaukri said...

A must read post! Good way of describing and pleasure piece of writing. Thanks!

VBSPU BSc 3rd year result 2021
MJPRU BSc 3rd year result 2021
Uniraj BSc 3rd year result 2021

Med Femme Fertility said...

Medfemme Fertility is the best Fertility Specialist, Infertility Specialist, High Risk Pregnancy Specialist in Delhi. For more information in details visit our website.
High Risk Pregnancy Specialist in Delhi

SarswatiEnterprises said...

Sarswatienterprises is a trusted Die Set Manufacturers, Power Press Manufacturer, and Flip off Seals Machinery in Delhi, India. For more information visit our website.
Air Blower Machine Manufacturer in Delhi

Pawfolic - Pet Store, Supplies | Professional Training & Grooming Services said...

Visit Pawfolic for Pet Grooming Services, Best Dog Grooming Services in Delhi NCR, and Dog training Services in Delhi NCR. For more information visit our website.
Dog training Services in Delhi NCR

Tender Management Services - Bidz365 said...

Nice Blog. Visit for GeM Helpdesk Helpline, Vendor Assessment on GeM, Tender Information Services, and Gem Consultancy in Delhi NCR. Visit our website for more information in details.
Tender Information Services

Aarfragrances said...

Amazing Blog. Visit AAR Fragrance for Perfumes for Men Online at Best Prices in India, Buy Perfumes for Women Online in India, Davidoff Cool Water For Men EDT 125ml, and Versace Pour Homme Dylan Blue EDT 100ml.
Buy Perfumes for Women Online in India

JDM of Washington said...

Get the best deals on honda acura engines for sale, toyota transmission for sale and jdm lexus engines online at JDM of Washington. For more information in detail visit our website.
Honda Acura Engines for Sale

amfez said...

Nice information, thank you so much sharing with us. Visit Amfez for Thakur ji ke vastra, kanha ji poshak, and krishna dress at an affordable price.
krishna dress