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

FR: Option to have all queries low priority #7524

Closed
morgo opened this issue Aug 29, 2018 · 7 comments
Closed

FR: Option to have all queries low priority #7524

morgo opened this issue Aug 29, 2018 · 7 comments
Assignees

Comments

@morgo
Copy link
Contributor

morgo commented Aug 29, 2018

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

Currently, it is possible to explicitly set individual queries to either low or high priority:
https://github.com/pingcap/docs/blob/master/FAQ.md#how-to-control-or-change-the-execution-priority-of-sql-commits

I would like to have an option to be able to set all queries from a TiDB server to Low Priority.

  1. What did you expect to see?

An option. i.e. tidb_force_priority = LOW_PRIORITY.

  1. What did you see instead?

Individual queries require hints.

  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.1-13-g1255973
Git Commit Hash: 1255973764f72575d71920b95fc0861d1677c6c5
Git Branch: master
UTC Build Time: 2018-08-28 07:35:57
GoVersion: go version go1.10.2 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
Copy link
Member

shenli commented Sep 24, 2018

@jackysp We need to add an option in the configure file to make the option persistent.

@shenli shenli reopened this Sep 24, 2018
@jackysp
Copy link
Member

jackysp commented Sep 25, 2018

@shenli , the current implementation could make the effect persistent for the TiDB server. Do we need to add one more option in the configure file?

@shenli
Copy link
Member

shenli commented Sep 25, 2018

If the tidb instance is rebooted, does the varible still take effort?

@jackysp
Copy link
Member

jackysp commented Sep 25, 2018

No, but there is rarely to specify a configuration file for a TiDB server. The deployment tools could not support it. The user needs to change the configuration file manually. If there is such a requirement, we can add it.

@morgo
Copy link
Contributor Author

morgo commented Sep 25, 2018

In MySQL 8.0, such a feature is called SET PERSIST.

@jackysp
Copy link
Member

jackysp commented Sep 25, 2018

@morgo , it is really a very useful feature. We could try to support it.

@morgo
Copy link
Contributor Author

morgo commented Sep 25, 2018

Yes, it has been really popular. There were a couple of additions before 8.0 went GA: SET PERSIST_ONLY and RESET PERSIST. I think in TiDB's case a logical extension would be to set persistent configuration for the whole cluster (using pd to distribute).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants