We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
运用Archery平台进行数据归档后,发现数据库中存在两个空闲线程未释放,请问这两个连接怎么释放?
Archery的归档配置如下
运行归档前的数据库连接如下 mysql> show full processlist; +----+-----------------+-----------+--------+---------+------+------------------------+-----------------------+-----------+---------------+ | Id | User | Host | db | Command | Time | State | Info | Rows_sent | Rows_examined | +----+-----------------+-----------+--------+---------+------+------------------------+-----------------------+-----------+---------------+ | 4 | event_scheduler | localhost | NULL | Daemon | 763 | Waiting on empty queue | NULL | 0 | 0 | | 10 | root | localhost | sbtest | Query | 0 | starting | show full processlist | 0 | 0 | +----+-----------------+-----------+--------+---------+------+------------------------+-----------------------+-----------+---------------+ 2 rows in set (0.00 sec)
运行归档后的数据库连接如下 mysql> show full processlist; +----+-----------------+--------------------+--------+---------+------+------------------------+-----------------------+-----------+---------------+ | Id | User | Host | db | Command | Time | State | Info | Rows_sent | Rows_examined | +----+-----------------+--------------------+--------+---------+------+------------------------+-----------------------+-----------+---------------+ | 4 | event_scheduler | localhost | NULL | Daemon | 1331 | Waiting on empty queue | NULL | 0 | 0 | | 10 | root | localhost | sbtest | Query | 0 | starting | show full processlist | 0 | 0 | | 17 | koby | 39.106.6.241:52110 | NULL | Sleep | 548 | | NULL | 14 | 44 | | 18 | koby | 39.106.6.241:52112 | NULL | Sleep | 547 | | NULL | 14 | 44 | +----+-----------------+--------------------+--------+---------+------+------------------------+-----------------------+-----------+---------------+
运行过程中的general log如下
2021-08-10T10:37:46.977828+08:00 17 Connect koby@39.106.6.241 on using TCP/IP 2021-08-10T10:37:46.982355+08:00 17 Query SET AUTOCOMMIT = 0 2021-08-10T10:37:46.986881+08:00 17 Query SELECT VERSION() as version 2021-08-10T10:37:46.991503+08:00 17 Query SELECT SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA 2021-08-10T10:37:46.997241+08:00 17 Query SELECT TABLE_NAME, ENGINE, ROW_FORMAT, AUTO_INCREMENT, CREATE_OPTIONS, TABLE_COLLATION, TABLE_COMMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA='sbtest' AND not isnull(ENGINE) 2021-08-10T10:37:47.025913+08:00 18 Connect koby@39.106.6.241 on using TCP/IP 2021-08-10T10:37:47.030788+08:00 18 Query SET AUTOCOMMIT = 0 2021-08-10T10:37:47.035701+08:00 18 Query SELECT VERSION() as version 2021-08-10T10:37:47.040719+08:00 18 Query SELECT SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA 2021-08-10T10:37:47.046941+08:00 18 Query SELECT TABLE_NAME, ENGINE, ROW_FORMAT, AUTO_INCREMENT, CREATE_OPTIONS, TABLE_COLLATION, TABLE_COMMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA='sbtest' AND not isnull(ENGINE) 2021-08-10T10:37:47.195307+08:00 19 Connect koby@39.106.6.241 on sbtest using TCP/IP 2021-08-10T10:37:47.199837+08:00 19 Query set autocommit=0 2021-08-10T10:37:47.204366+08:00 19 Query /!40101 SET NAMES "utf8mb4"/ 2021-08-10T10:37:47.208914+08:00 19 Query SHOW VARIABLES LIKE 'wait_timeout' 2021-08-10T10:37:47.216938+08:00 19 Query SET SESSION wait_timeout=10000 2021-08-10T10:37:47.221448+08:00 19 Query SELECT @@SQL_MODE 2021-08-10T10:37:47.225811+08:00 19 Query SET @@SQL_QUOTE_SHOW_CREATE = 1/!40101, @@SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'/ 2021-08-10T10:37:47.230153+08:00 19 Query SELECT VERSION() 2021-08-10T10:37:47.234481+08:00 19 Query SHOW VARIABLES LIKE 'character_set_server' 2021-08-10T10:37:47.242481+08:00 19 Query SET NAMES 'utf8mb4' 2021-08-10T10:37:47.246999+08:00 19 Query SELECT version() 2021-08-10T10:37:47.251496+08:00 19 Query /!40101 SET character_set_connection = utf8mb4 / 2021-08-10T10:37:47.255953+08:00 19 Query SHOW VARIABLES LIKE 'version%' 2021-08-10T10:37:47.262599+08:00 19 Query SHOW ENGINES 2021-08-10T10:37:47.267433+08:00 19 Query SHOW VARIABLES LIKE 'innodb_version' 2021-08-10T10:37:47.274428+08:00 19 Query show variables like 'innodb_rollback_on_timeout' 2021-08-10T10:37:47.280824+08:00 19 Query /!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 / 2021-08-10T10:37:47.285186+08:00 19 Query USE sbtest 2021-08-10T10:37:47.289622+08:00 19 Query SHOW CREATE TABLE sbtest.sbtest1 2021-08-10T10:37:47.294322+08:00 19 Query /!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE / 2021-08-10T10:37:47.299035+08:00 19 Query SELECT CONCAT(/!40100 @@session.character_set_connection, / "") 2021-08-10T10:37:47.316536+08:00 20 Connect koby@39.106.6.241 on sbtest using TCP/IP 2021-08-10T10:37:47.321004+08:00 20 Query set autocommit=0 2021-08-10T10:37:47.325388+08:00 20 Query /!40101 SET NAMES "utf8mb4"/ 2021-08-10T10:37:47.329963+08:00 20 Query SHOW VARIABLES LIKE 'wait_timeout' 2021-08-10T10:37:47.337250+08:00 20 Query SET SESSION wait_timeout=10000 2021-08-10T10:37:47.341790+08:00 20 Query SELECT @@SQL_MODE 2021-08-10T10:37:47.346125+08:00 20 Query SET @@SQL_QUOTE_SHOW_CREATE = 1/!40101, @@SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'/ 2021-08-10T10:37:47.350557+08:00 20 Query SELECT VERSION() 2021-08-10T10:37:47.354902+08:00 20 Query SHOW VARIABLES LIKE 'character_set_server' 2021-08-10T10:37:47.361082+08:00 20 Query SET NAMES 'utf8mb4' 2021-08-10T10:37:47.365449+08:00 20 Query SELECT version() 2021-08-10T10:37:47.369934+08:00 20 Query /*!40101 SET character_set_connection = utf8mb4 / 2021-08-10T10:37:47.374315+08:00 20 Query SHOW VARIABLES LIKE 'version%' 2021-08-10T10:37:47.380643+08:00 20 Query SHOW ENGINES 2021-08-10T10:37:47.385410+08:00 20 Query SHOW VARIABLES LIKE 'innodb_version' 2021-08-10T10:37:47.391886+08:00 20 Query show variables like 'innodb_rollback_on_timeout' 2021-08-10T10:37:47.397883+08:00 20 Query /!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 / 2021-08-10T10:37:47.402240+08:00 20 Query USE sbtest 2021-08-10T10:37:47.406596+08:00 20 Query SHOW CREATE TABLE sbtest.sbtest1_his 2021-08-10T10:37:47.411206+08:00 20 Query /!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE / 2021-08-10T10:37:47.415899+08:00 20 Query SELECT CONCAT(/!40100 @@session.character_set_connection, */ "")
TABLES
sbtest
sbtest1
sbtest1_his
归档成功后的界面如下
The text was updated successfully, but these errors were encountered:
5fc6443
归档任务执行时关闭schema_object创建的连接 fix hhyo#1155
d694741
(cherry picked from commit 5fc6443)
No branches or pull requests
问题描述
运用Archery平台进行数据归档后,发现数据库中存在两个空闲线程未释放,请问这两个连接怎么释放?
版本信息
Archery的归档配置如下
运行归档前的数据库连接如下
mysql> show full processlist;
+----+-----------------+-----------+--------+---------+------+------------------------+-----------------------+-----------+---------------+
| Id | User | Host | db | Command | Time | State | Info | Rows_sent | Rows_examined |
+----+-----------------+-----------+--------+---------+------+------------------------+-----------------------+-----------+---------------+
| 4 | event_scheduler | localhost | NULL | Daemon | 763 | Waiting on empty queue | NULL | 0 | 0 |
| 10 | root | localhost | sbtest | Query | 0 | starting | show full processlist | 0 | 0 |
+----+-----------------+-----------+--------+---------+------+------------------------+-----------------------+-----------+---------------+
2 rows in set (0.00 sec)
运行归档后的数据库连接如下
mysql> show full processlist;
+----+-----------------+--------------------+--------+---------+------+------------------------+-----------------------+-----------+---------------+
| Id | User | Host | db | Command | Time | State | Info | Rows_sent | Rows_examined |
+----+-----------------+--------------------+--------+---------+------+------------------------+-----------------------+-----------+---------------+
| 4 | event_scheduler | localhost | NULL | Daemon | 1331 | Waiting on empty queue | NULL | 0 | 0 |
| 10 | root | localhost | sbtest | Query | 0 | starting | show full processlist | 0 | 0 |
| 17 | koby | 39.106.6.241:52110 | NULL | Sleep | 548 | | NULL | 14 | 44 |
| 18 | koby | 39.106.6.241:52112 | NULL | Sleep | 547 | | NULL | 14 | 44 |
+----+-----------------+--------------------+--------+---------+------+------------------------+-----------------------+-----------+---------------+
运行过程中的general log如下
2021-08-10T10:37:46.977828+08:00 17 Connect koby@39.106.6.241 on using TCP/IP
2021-08-10T10:37:46.982355+08:00 17 Query SET AUTOCOMMIT = 0
2021-08-10T10:37:46.986881+08:00 17 Query SELECT VERSION() as version
2021-08-10T10:37:46.991503+08:00 17 Query SELECT SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME,
DEFAULT_COLLATION_NAME
FROM information_schema.SCHEMATA
2021-08-10T10:37:46.997241+08:00 17 Query SELECT TABLE_NAME, ENGINE, ROW_FORMAT, AUTO_INCREMENT,
CREATE_OPTIONS, TABLE_COLLATION, TABLE_COMMENT
FROM information_schema.
TABLES
WHERE TABLE_SCHEMA='sbtest'
AND not isnull(ENGINE)
2021-08-10T10:37:47.025913+08:00 18 Connect koby@39.106.6.241 on using TCP/IP
2021-08-10T10:37:47.030788+08:00 18 Query SET AUTOCOMMIT = 0
2021-08-10T10:37:47.035701+08:00 18 Query SELECT VERSION() as version
2021-08-10T10:37:47.040719+08:00 18 Query SELECT SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME,
DEFAULT_COLLATION_NAME
FROM information_schema.SCHEMATA
2021-08-10T10:37:47.046941+08:00 18 Query SELECT TABLE_NAME, ENGINE, ROW_FORMAT, AUTO_INCREMENT,
CREATE_OPTIONS, TABLE_COLLATION, TABLE_COMMENT
FROM information_schema.
TABLES
WHERE TABLE_SCHEMA='sbtest'
AND not isnull(ENGINE)
2021-08-10T10:37:47.195307+08:00 19 Connect koby@39.106.6.241 on sbtest using TCP/IP
2021-08-10T10:37:47.199837+08:00 19 Query set autocommit=0
2021-08-10T10:37:47.204366+08:00 19 Query /!40101 SET NAMES "utf8mb4"/
2021-08-10T10:37:47.208914+08:00 19 Query SHOW VARIABLES LIKE 'wait_timeout'
2021-08-10T10:37:47.216938+08:00 19 Query SET SESSION wait_timeout=10000
2021-08-10T10:37:47.221448+08:00 19 Query SELECT @@SQL_MODE
2021-08-10T10:37:47.225811+08:00 19 Query SET @@SQL_QUOTE_SHOW_CREATE = 1/!40101, @@SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'/
2021-08-10T10:37:47.230153+08:00 19 Query SELECT VERSION()
2021-08-10T10:37:47.234481+08:00 19 Query SHOW VARIABLES LIKE 'character_set_server'
2021-08-10T10:37:47.242481+08:00 19 Query SET NAMES 'utf8mb4'
2021-08-10T10:37:47.246999+08:00 19 Query SELECT version()
2021-08-10T10:37:47.251496+08:00 19 Query /!40101 SET character_set_connection = utf8mb4 /
2021-08-10T10:37:47.255953+08:00 19 Query SHOW VARIABLES LIKE 'version%'
2021-08-10T10:37:47.262599+08:00 19 Query SHOW ENGINES
2021-08-10T10:37:47.267433+08:00 19 Query SHOW VARIABLES LIKE 'innodb_version'
2021-08-10T10:37:47.274428+08:00 19 Query show variables like 'innodb_rollback_on_timeout'
2021-08-10T10:37:47.280824+08:00 19 Query /!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 /
2021-08-10T10:37:47.285186+08:00 19 Query USE
sbtest
2021-08-10T10:37:47.289622+08:00 19 Query SHOW CREATE TABLE
sbtest
.sbtest1
2021-08-10T10:37:47.294322+08:00 19 Query /!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE /
2021-08-10T10:37:47.299035+08:00 19 Query SELECT CONCAT(/!40100 @@session.character_set_connection, / "")
2021-08-10T10:37:47.316536+08:00 20 Connect koby@39.106.6.241 on sbtest using TCP/IP
2021-08-10T10:37:47.321004+08:00 20 Query set autocommit=0
2021-08-10T10:37:47.325388+08:00 20 Query /!40101 SET NAMES "utf8mb4"/
2021-08-10T10:37:47.329963+08:00 20 Query SHOW VARIABLES LIKE 'wait_timeout'
2021-08-10T10:37:47.337250+08:00 20 Query SET SESSION wait_timeout=10000
2021-08-10T10:37:47.341790+08:00 20 Query SELECT @@SQL_MODE
2021-08-10T10:37:47.346125+08:00 20 Query SET @@SQL_QUOTE_SHOW_CREATE = 1/!40101, @@SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'/
2021-08-10T10:37:47.350557+08:00 20 Query SELECT VERSION()
2021-08-10T10:37:47.354902+08:00 20 Query SHOW VARIABLES LIKE 'character_set_server'
2021-08-10T10:37:47.361082+08:00 20 Query SET NAMES 'utf8mb4'
2021-08-10T10:37:47.365449+08:00 20 Query SELECT version()
2021-08-10T10:37:47.369934+08:00 20 Query /*!40101 SET character_set_connection = utf8mb4 /
2021-08-10T10:37:47.374315+08:00 20 Query SHOW VARIABLES LIKE 'version%'
2021-08-10T10:37:47.380643+08:00 20 Query SHOW ENGINES
2021-08-10T10:37:47.385410+08:00 20 Query SHOW VARIABLES LIKE 'innodb_version'
2021-08-10T10:37:47.391886+08:00 20 Query show variables like 'innodb_rollback_on_timeout'
2021-08-10T10:37:47.397883+08:00 20 Query /!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 /
2021-08-10T10:37:47.402240+08:00 20 Query USE
sbtest
2021-08-10T10:37:47.406596+08:00 20 Query SHOW CREATE TABLE
sbtest
.sbtest1_his
2021-08-10T10:37:47.411206+08:00 20 Query /!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE /
2021-08-10T10:37:47.415899+08:00 20 Query SELECT CONCAT(/!40100 @@session.character_set_connection, */ "")
归档成功后的界面如下
The text was updated successfully, but these errors were encountered: