ColumnStore로 생성하던 테이블이 실패가 났었는데, Shutdown 하려고 하니 다음과 같은 에러가 발생 함.
작업 중에 Connection Fail이 나면서 해당 세션은 현재 존재 하지않음.
[root@DTEST2 db]# mcsadmin shutdownsystem y shutdownsystem Mon Jan 22 10:54:58 2018
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 1 columnstore.td_pageview_bak DDLProc 9994 18 2018-01-19 오후 02시 06분 18초 Abandoned1 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]: |
MariaDB [columnstore]> show processlist ; +----+-------------+-----------+-------------+---------+------+--------------------------+------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------+-------------+---------+------+--------------------------+------------------+----------+ | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 9 | root | localhost | columnstore | Query | 0 | init | show processlist | 0.000 | +----+-------------+-----------+-------------+---------+------+--------------------------+------------------+----------+ 6 rows in set (0.00 sec)
MariaDB [columnstore]> kill 18 ; ERROR 1094 (HY000): Unknown thread id: 18 MariaDB [columnstore]> exit Bye [root@DTEST2 db]# ps -ef | grep 9994 root 10406 5101 0 10:51 pts/2 00:00:00 grep --color=auto 9994 |
테이블을 조회해 보면 해당 테이블은 존재를 함.
MariaDB [columnstore]> show tables ; +-------------------------+ | Tables_in_columnstore | +-------------------------+ | td_pageview | | td_pageview_bak | | td_pageview_columnstore | +-------------------------+
MariaDB [columnstore]> drop table td_pageview_bak ; ERROR 1815 (HY000): Internal error: CAL0009: Drop table failed due to IDB-2009: Unable to perform the drop table operation because DDLProc with PID 9994 is currently holding the table lock for session 18. |
테이블 락 조회
[root@DTEST2 columnstore]# /usr/local/mariadb/columnstore/bin/viewtablelock There is 1 table lock
Table LockID Process PID Session Txn CreationTime State DBRoots columnstore.td_pageview_bak 1 DDLProc 9994 18 9532 Fri Jan 19 14:06:18 2018 LOADING 1 |
Clear 테이블 락
[root@DTEST2 columnstore]# /usr/local/mariadb/columnstore/bin/cleartablelock 1 Rolling back and clearing table lock for table columnstore.td_pageview_bak; table lock 1
Sending rollback request to PM1... Successful rollback response from PM1 Sending cleanup request to PM1... Successful cleanup response from PM1
Table lock 1 for table columnstore.td_pageview_bak is cleared. |