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

feat(setting): support global setting #6579

Merged
merged 5 commits into from
Jul 13, 2022

Conversation

fkuner
Copy link
Collaborator

@fkuner fkuner commented Jul 12, 2022

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

set global max_threads = 16;

The setting max_thread must be in our settings which will be displayed when show settings;

The global setting will be stored in metasrv according to tenant. So each tenant has their own global setting and can be shared on different sessions. Clients can also execute set max_threads = 8 to override global setting in session granularity.

Fixes #3933

@vercel
Copy link

vercel bot commented Jul 12, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
databend ⬜️ Ignored (Inspect) Jul 13, 2022 at 4:14AM (UTC)

@mergify mergify bot added the pr-feature this PR introduces a new feature to the codebase label Jul 12, 2022
@fkuner fkuner marked this pull request as ready for review July 12, 2022 16:47
@Xuanwo
Copy link
Member

Xuanwo commented Jul 12, 2022

Do we need to prevent users to set a 4mb value which could break our meta services?

@BohuTANG
Copy link
Member

BohuTANG commented Jul 13, 2022

Do we need to prevent users to set a 4mb value which could break our meta services?

Users can not set a global setting which not in our settings, so this example:

set global a = 1;

is not right, we can only set the settings(show settings) not user-defined as a.

@fkuner
Copy link
Collaborator Author

fkuner commented Jul 13, 2022

Yes, the summary is inaccurate.

@BohuTANG
Copy link
Member

Not sure the CI failure is related to this PR, please have a check @fkuner

@fkuner
Copy link
Collaborator Author

fkuner commented Jul 13, 2022

I think failed test is not related to this pr.

@Xuanwo
Copy link
Member

Xuanwo commented Jul 13, 2022

@mergify update

@mergify
Copy link
Contributor

mergify bot commented Jul 13, 2022

update

✅ Branch has been successfully updated

@fkuner
Copy link
Collaborator Author

fkuner commented Jul 13, 2022

The sqllogic test has many errors. I am uncertian whether it's related to thir pr. Please have a look. @ZeaLoVe

@Xuanwo
Copy link
Member

Xuanwo commented Jul 13, 2022

Yes, the summary is inaccurate.

Hi, can you update the summary so newcomers will not be confused?

The sqllogic test has many errors. I am uncertian whether it's related to thir pr. Please have a look. @ZeaLoVe

I have merged against the main branch. Let's have a look.

@fkuner
Copy link
Collaborator Author

fkuner commented Jul 13, 2022

Hi, can you update the summary so newcomers will not be confused?

Have updated the summary.

@BohuTANG BohuTANG mentioned this pull request Jul 13, 2022
55 tasks
@flaneur2020
Copy link
Member

2022-07-13T03:39:13.6863556Z 2022-07-13T03:39:13.686221Z  INFO databend_query::servers::http::clickhouse_handler: receive clickhouse http post, (query + body) = create table db2.test6(id Int8, created timestamp  DEFAULT CURRENT_TIMESTAMP);
2022-07-13T03:39:13.6895420Z 2022-07-13T03:39:13.689409Z  WARN databend_query::servers::http::middleware: http request error: Code: 1065, displayText = Unsupported literal value: CURRENT_TIMESTAMP.
2022-07-13T03:39:13.6909563Z Traceback (most recent call last):
2022-07-13T03:39:13.6909853Z   File "main.py", line 41, in <module>
2022-07-13T03:39:13.6910146Z     fire.Fire(run)
2022-07-13T03:39:13.6910736Z   File "/home/runner/.local/lib/python3.8/site-packages/fire/core.py", line 141, in Fire
2022-07-13T03:39:13.6911257Z     component_trace = _Fire(component, args, parsed_flag_args, context, name)
2022-07-13T03:39:13.6911894Z   File "/home/runner/.local/lib/python3.8/site-packages/fire/core.py", line 466, in _Fire
2022-07-13T03:39:13.6912345Z     component, remaining_args = _CallAndUpdateTrace(
2022-07-13T03:39:13.6912966Z   File "/home/runner/.local/lib/python3.8/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace
2022-07-13T03:39:13.6913289Z     component = fn(*varargs, **kwargs)
2022-07-13T03:39:13.6913523Z   File "main.py", line 37, in run
2022-07-13T03:39:13.6913731Z     http.run_sql_suite()
2022-07-13T03:39:13.6914033Z   File "/runner/_work/databend/databend/tests/logictest/logictest.py", line 378, in run_sql_suite
2022-07-13T03:39:13.6914313Z     self.execute()
2022-07-13T03:39:13.6914588Z   File "/runner/_work/databend/databend/tests/logictest/logictest.py", line 289, in execute
2022-07-13T03:39:13.6914882Z     self.batch_execute(statement_list)
2022-07-13T03:39:13.6915202Z   File "/runner/_work/databend/databend/tests/logictest/clickhouse_runner.py", line 27, in batch_execute
2022-07-13T03:39:13.6915502Z     self.execute_statement(statement)
2022-07-13T03:39:13.6915819Z   File "/runner/_work/databend/databend/tests/logictest/logictest.py", line 310, in execute_statement
2022-07-13T03:39:13.6916134Z     self.assert_execute_error(statement)
2022-07-13T03:39:13.6916462Z   File "/runner/_work/databend/databend/tests/logictest/logictest.py", line 369, in assert_execute_error
2022-07-13T03:39:13.6916736Z     assert_that(
2022-07-13T03:39:13.6917192Z   File "/home/runner/.local/lib/python3.8/site-packages/hamcrest/core/assert_that.py", line 58, in assert_that
2022-07-13T03:39:13.6917545Z     _assert_match(actual=actual, matcher=matcher, reason=reason)
2022-07-13T03:39:13.6917986Z   File "/home/runner/.local/lib/python3.8/site-packages/hamcrest/core/assert_that.py", line 73, in _assert_match
2022-07-13T03:39:13.6918629Z     raise AssertionError(description)
2022-07-13T03:39:13.6918866Z AssertionError: statement 
2022-07-13T03:39:13.6919074Z Parsed Statement
2022-07-13T03:39:13.6919438Z     at_line: 54,
2022-07-13T03:39:13.6919658Z     s_type: Statement: error, type: None,
2022-07-13T03:39:13.6919880Z     suite_name: select_0,
2022-07-13T03:39:13.6920084Z     text:
2022-07-13T03:39:13.6920358Z         create table db2.test6(id Int8, created timestamp  DEFAULT CURRENT_TIMESTAMP);
2022-07-13T03:39:13.6929790Z     results: [],
2022-07-13T03:39:13.6930338Z     runs_on: {'clickhouse', 'mysql', 'http'},, expect error regex 1006, found Orig exception: Code: 1065, displayText = Unsupported literal value: CURRENT_TIMESTAMP.
2022-07-13T03:39:13.6930886Z Expected: not None
2022-07-13T03:39:13.6931100Z      but: but was <None>
2022-07-13T03:39:13.6931229Z 
2022-07-13T03:39:18.7351735Z ##[error]Process completed with exit code 1.
2022-07-13T03:39:18.7375521Z Prepare all required actions
2022-07-13T03:39:18.7375858Z Getting action download info
2022-07-13T03:39:18.9058251Z Download action repository 'actions/upload-artifact@v3' (SHA:3cea5372237819ed00197afe530f5a7ea3e805c8)

@fkuner
Copy link
Collaborator Author

fkuner commented Jul 13, 2022

2022-07-13T03:39:13.6863556Z 2022-07-13T03:39:13.686221Z  INFO databend_query::servers::http::clickhouse_handler: receive clickhouse http post, (query + body) = create table db2.test6(id Int8, created timestamp  DEFAULT CURRENT_TIMESTAMP);
2022-07-13T03:39:13.6895420Z 2022-07-13T03:39:13.689409Z  WARN databend_query::servers::http::middleware: http request error: Code: 1065, displayText = Unsupported literal value: CURRENT_TIMESTAMP.
2022-07-13T03:39:13.6909563Z Traceback (most recent call last):
2022-07-13T03:39:13.6909853Z   File "main.py", line 41, in <module>
2022-07-13T03:39:13.6910146Z     fire.Fire(run)
2022-07-13T03:39:13.6910736Z   File "/home/runner/.local/lib/python3.8/site-packages/fire/core.py", line 141, in Fire
2022-07-13T03:39:13.6911257Z     component_trace = _Fire(component, args, parsed_flag_args, context, name)
2022-07-13T03:39:13.6911894Z   File "/home/runner/.local/lib/python3.8/site-packages/fire/core.py", line 466, in _Fire
2022-07-13T03:39:13.6912345Z     component, remaining_args = _CallAndUpdateTrace(
2022-07-13T03:39:13.6912966Z   File "/home/runner/.local/lib/python3.8/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace
2022-07-13T03:39:13.6913289Z     component = fn(*varargs, **kwargs)
2022-07-13T03:39:13.6913523Z   File "main.py", line 37, in run
2022-07-13T03:39:13.6913731Z     http.run_sql_suite()
2022-07-13T03:39:13.6914033Z   File "/runner/_work/databend/databend/tests/logictest/logictest.py", line 378, in run_sql_suite
2022-07-13T03:39:13.6914313Z     self.execute()
2022-07-13T03:39:13.6914588Z   File "/runner/_work/databend/databend/tests/logictest/logictest.py", line 289, in execute
2022-07-13T03:39:13.6914882Z     self.batch_execute(statement_list)
2022-07-13T03:39:13.6915202Z   File "/runner/_work/databend/databend/tests/logictest/clickhouse_runner.py", line 27, in batch_execute
2022-07-13T03:39:13.6915502Z     self.execute_statement(statement)
2022-07-13T03:39:13.6915819Z   File "/runner/_work/databend/databend/tests/logictest/logictest.py", line 310, in execute_statement
2022-07-13T03:39:13.6916134Z     self.assert_execute_error(statement)
2022-07-13T03:39:13.6916462Z   File "/runner/_work/databend/databend/tests/logictest/logictest.py", line 369, in assert_execute_error
2022-07-13T03:39:13.6916736Z     assert_that(
2022-07-13T03:39:13.6917192Z   File "/home/runner/.local/lib/python3.8/site-packages/hamcrest/core/assert_that.py", line 58, in assert_that
2022-07-13T03:39:13.6917545Z     _assert_match(actual=actual, matcher=matcher, reason=reason)
2022-07-13T03:39:13.6917986Z   File "/home/runner/.local/lib/python3.8/site-packages/hamcrest/core/assert_that.py", line 73, in _assert_match
2022-07-13T03:39:13.6918629Z     raise AssertionError(description)
2022-07-13T03:39:13.6918866Z AssertionError: statement 
2022-07-13T03:39:13.6919074Z Parsed Statement
2022-07-13T03:39:13.6919438Z     at_line: 54,
2022-07-13T03:39:13.6919658Z     s_type: Statement: error, type: None,
2022-07-13T03:39:13.6919880Z     suite_name: select_0,
2022-07-13T03:39:13.6920084Z     text:
2022-07-13T03:39:13.6920358Z         create table db2.test6(id Int8, created timestamp  DEFAULT CURRENT_TIMESTAMP);
2022-07-13T03:39:13.6929790Z     results: [],
2022-07-13T03:39:13.6930338Z     runs_on: {'clickhouse', 'mysql', 'http'},, expect error regex 1006, found Orig exception: Code: 1065, displayText = Unsupported literal value: CURRENT_TIMESTAMP.
2022-07-13T03:39:13.6930886Z Expected: not None
2022-07-13T03:39:13.6931100Z      but: but was <None>
2022-07-13T03:39:13.6931229Z 
2022-07-13T03:39:18.7351735Z ##[error]Process completed with exit code 1.
2022-07-13T03:39:18.7375521Z Prepare all required actions
2022-07-13T03:39:18.7375858Z Getting action download info
2022-07-13T03:39:18.9058251Z Download action repository 'actions/upload-artifact@v3' (SHA:3cea5372237819ed00197afe530f5a7ea3e805c8)

Yes, it seems not to be related to this pr.

@mergify mergify bot merged commit cdd8703 into datafuselabs:main Jul 13, 2022
@ZeaLoVe
Copy link
Contributor

ZeaLoVe commented Jul 13, 2022

logictest failed fix in #6593

@BohuTANG BohuTANG mentioned this pull request Jul 26, 2022
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Global settings
7 participants