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

After scaling out tidb-server, execute SQL ERROR 1105 (HY000) #19985

Closed
together-wang opened this issue Sep 14, 2020 · 4 comments · Fixed by #20000
Closed

After scaling out tidb-server, execute SQL ERROR 1105 (HY000) #19985

together-wang opened this issue Sep 14, 2020 · 4 comments · Fixed by #20000
Assignees
Labels
component/executor severity/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@together-wang
Copy link

together-wang commented Sep 14, 2020

Bug Report

If the expanded tidb node has not been used for a long time and cannot generate slow logs, does the information_schema.cluster_slow_query query fail as expected?

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

After scaling out tidb-server, execute SQL ERROR 1105 (HY000) at line 1: other error: open log/tidb_slow_query.log: no such file or directory.

tiup cluster scale-out test-cluster ./add_tidb.yaml

$ mysql -uroot -p -P4200 -hxx.xx.xx.xx -e "select * from information_schema.CLUSTER_SLOW_QUERY;"
Enter password:
ERROR 1105 (HY000) at line 1: other error: open log/tidb_slow_query.log: no such file or directory

2. What did you expect to see? (Required)

MySQL [(none)]> select * from information_schema.CLUSTER_SLOW_QUERY;
ERROR 1105 (HY000): other error: open log/tidb_slow_query.log: no such file or directory

3. What did you see instead (Required)

SQL can return results normally

4. What is your TiDB version? (Required)

MySQL [(none)]> select tidb_version();
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v4.0.5
Edition: Community
Git Commit Hash: 9c1c212
Git Branch: heads/refs/tags/v4.0.5
UTC Build Time: 2020-08-28 10:07:42
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

tiup cluster edit-config test-cluster
image

@together-wang together-wang added the type/bug The issue is confirmed as a bug. label Sep 14, 2020
@ZenoTan
Copy link

ZenoTan commented Sep 15, 2020

/label sig/ddl

@sre-bot
Copy link
Contributor

sre-bot commented Sep 16, 2020

Integrity check:
component severity RCA symptom affect_version fix_version fields are empty
@crazycs520
Please comment /info to get template

@ti-srebot
Copy link
Contributor

ti-srebot commented Sep 16, 2020

Please edit this comment to complete the following information

Bug

1. Root Cause Analysis (RCA)

When the slow-log file doesn't exist, query slow_query or cluster_slow_query will return error.

2. Symptom

> select count(*) from information_schema.cluster_slow_query;
(1105, 'other error: open tidb-slow.log: no such file or directory')

3. Minimal steps to reproduce the bug (optional)

Remove tidb slow-log file and query slow_query will return error.

4. Solution (optional)

Generate a slow log will be ok. Find the tidb-server which doesn't have slow-log file, then execute select sleep(10);. (sleep time more than tidb_slow_log_threshold will be ok).

5. W/A (Workaround)

  • No.

6. Affected versions

[v3.0.0:v3.0.18], [v3.1.0:v3.1.2], [v4.0.0:v4.0.6]

7. Fixed versions

v3.0.19, v3.1.3 v4.0.7

@seiya-annie
Copy link

seiya-annie commented Oct 16, 2020

Please edit this comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA)

When the slow-log file doesn't exist, query slow_query or cluster_slow_query will return error.

2. Symptom

select count(*) from information_schema.cluster_slow_query;
(1105, 'other error: open tidb-slow.log: no such file or directory')

3. All Trigger Conditions

Remove tidb slow-log file and query slow_query will return error.

4. Workaround (optional)

5. Affected versions

[v3.0.0:v3.0.18], [v3.1.0:v3.1.2], [v4.0.0:v4.0.6]

6. Fixed versions

v3.0.19, v3.1.3 v4.0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/executor severity/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants