Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-3324

Table remains locked after force restart of columnstore system



    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.2.4
    • 5.5.2, 5.6.1
    • cpimport
    • None
    • UM1_PM1-PM2


      Table remains locked after force restart of columnstore system

      expected : clear tables locks after force restart columnstore system

      Start load data in table catalog_sales with cpimport in mode m1
      Break the cpimport from the client
      kill the cpimport process on the PM1
      Force restart mcs system , columnstore is successfully restarted, all mcs process are active
      Drop the table catalog_sales -it's returned Error , although the table is empty a, it appears that the table lock was not cleared after restating ;

      note : cannot perform clear tableloacks as the PID of the not existing cpimport process is hold in table locks list after restarting

      [root@pm1_1 ~]# mcsadmin shut
      shutdownsystem   Wed May 22 14:13:02 2019
      This command stops the processing of applications on all Modules within the MariaDB ColumnStore System
         Checking for active transactions
      The following tables are locked:
      LockID Name                     Process  PID   Session  CreationTime           State    DBRoots
      304    tpcds_1000.catalog_sales cpimport 18854 BulkLoad 2019-05-22 01:10:03 PM LOADING  1      ,2
      Your options are:
          Cancel    -- Cancel the shutdown request
          Wait      -- Wait for write operations to end and then shutdown
          Force     -- Force a shutdown
      What would you like to do: [Cancel]: Force
         Stopping System...
         Successful stop of System
         Shutting Down System...
         Successful shutdown of System
      [root@pm1_1 ~]# mcsadmin start
      startsystem   Wed May 22 14:14:08 2019
      startSystem command, 'columnstore' service is down, sending command to
      start the 'columnstore' service on all modules
         System being started, please wait..........
         System Not Ready, DMLProc is checking/processing rollback of abandoned transactions. Processing could take some time, please wait....
         Successful start of System

      after system has being restarted

      MariaDB [(none)]> drop table tpcds_1000.catalog_sales ;
      ERROR 1815 (HY000): Internal error: CAL0009: Drop table failed due to  IDB-2009: Unable to perform the drop table operation because cpimport with PID 16301 is currently holding the table lock for session -1.
      MariaDB [(none)]> select count(*) from tpcds_1000.catalog_sales ;
      | count(*) |
      |        0 |
      1 row in set (0.098 sec)

      after system has being restarted

      [root@pm1_1 ~]# /usr/local/mariadb/columnstore/bin/viewtablelock
       There is 1 table lock
        Table                     LockID  Process   PID    Session   Txn  CreationTime              State    DBRoots
        tpcds_1000.catalog_sales  1       cpimport  16301  BulkLoad  n/a  Wed May 22 14:20:42 2019  LOADING  1,2
      [root@pm1_1 ~]# /usr/local/mariadb/columnstore/bin/cleartablelock 1
      Rolling back and clearing table lock for table tpcds_1000.catalog_sales; table lock 1
      Rollback error: Unable to grab lock; Lock not found or still in use.
      Table lock 1 for table tpcds_1000.catalog_sales is not cleared.

      [root@pm1_1 ~]# ps aux | grep cpimport | grep -v grep
      [root@pm2_2 ~]# ps aux | grep cpimport | grep -v grep




            dleeyh Daniel Lee (Inactive)
            winstone Zdravelina Sokolovska (Inactive)
            2 Vote for this issue
            7 Start watching this issue



              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.