Skip to content
New issue

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

mydumper refuses to backup with idle sessions #7825

Closed
morgo opened this issue Oct 1, 2018 · 1 comment
Closed

mydumper refuses to backup with idle sessions #7825

morgo opened this issue Oct 1, 2018 · 1 comment
Labels
type/bug The issue is confirmed as a bug.

Comments

@morgo
Copy link
Contributor

morgo commented Oct 1, 2018

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

It looks like mydumper breaks in a lot of cases due to #7765 now including an accurate processlist time. It incorrectly triggers mydumper's test to make sure there are no long running transactions.

  1. What did you expect to see?

The problem is that idle sessions in TiDB are said to be in the Command of "Query" whereas in MySQL they would be in the Command of "Sleep". i.e.

MySQL [(none)]> show processlist;
+------+------+-----------+-----------+---------+------+-------+------------------+------+
| Id   | User | Host      | db        | Command | Time | State | Info             | Mem  |
+------+------+-----------+-----------+---------+------+-------+------------------+------+
|   81 | root | 127.0.0.1 |           | Query   |    0 | 2     | show processlist |    0 |
|   44 | root | 127.0.0.1 | bikeshare | Query   |   99 | 2     |                  |    0 |
+------+------+-----------+-----------+---------+------+-------+------------------+------+
2 rows in set (0.00 sec)

There is no activity, it should be safe to backup.

  1. What did you see instead?

This caused the following error until I 'pinged' the session to reset the idle time.

tocker@penguin:~/go/src/github.com/morgo/mydumper$ ./mydumper -v 3  --database bikeshare
** Message: Server version reported as: 5.7.10-TiDB-v2.1.0-rc.2-38-g081920da9-dirty
** Message: Connected to a TiDB server

** (mydumper:12392): CRITICAL **: There are queries in PROCESSLIST running longer than 60s, aborting dump,
        use --long-query-guard to change the guard value, kill queries (--kill-long-queries) or use
        different server for dump
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
MySQL [(none)]> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v2.1.0-rc.2-38-g081920da9-dirty
Git Commit Hash: 081920da935e04967df1c408841e013d010eb1b3
Git Branch: showtablestatus
UTC Build Time: 2018-09-27 12:59:15
GoVersion: go version go1.11 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false
1 row in set (0.00 sec)
@shenli shenli added the type/bug The issue is confirmed as a bug. label Oct 2, 2018
@shenli
Copy link
Member

shenli commented Oct 2, 2018

@morgo We will fix it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants