-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Queries from charts for async databases are being executed in the server instances, not the workers #22030
Comments
Hi, we are facing the same issue. @diogenes1oliveira did you find any fix or workaround? |
Enabling AQE for a database only applies to SQL Lab - for charts you'll need to enable the |
Hi @dingbat, is there any doc or guide which shows how to use |
Hi @shauryagoel, did you fix the issue related to setting up the GLOBAL_ASYNC_QUERIES flag in superset_config.py file for charts asynchronous query executions task in Celery? If yes, can I know the solution? |
You have to set same value for GLOBAL_ASYNC_QUERIES_REDIS_CONFIG in superset_config.py as in config.json that is used by superset-websocket
|
Also wondering if there is a guide on using |
@Tim-Hodge the GAQ feature was effectively in beta, and is about to go under a revamp. See SIP-143 for more details/discussion/voting (CC @villebro re: revisiting docs as part of the SIP... happy to help here if needed). |
Charts for databases with Asynchronous query execution aren't being executed in the worker nodes as expected.
How to reproduce the bug
Advanced > Other > Engine Parameters
:Advanced > Performance > Asynchronous query execution
;Expected results
I expected the queries to be executed in the worker instance. For instance, when running through SQL Lab that's what happens. The unexpected behavior occurs when using dashboards.
Actual results
We see the connection being established in the webserver instance, not the worker (
1.2.3.4
stands for the IP of my database with data to be charted, not the Superset database)pod-app-hostname 2022-11-03 19:19:30,871 DEBUG sqlalchemy.pool.impl.NullPool Created new connection <_mysql.connection open to '1.2.3.4' at 0x55beb238bc50>
pod-app-hostname DEBUG:sqlalchemy.pool.impl.NullPool:Created new connection <_mysql.connection open to '1.2.3.4' at 0x55beb238bc50>
pod-app-hostname INFO:sqlalchemy.engine.base.Engine:SHOW VARIABLES LIKE 'sql_mode'
pod-app-hostname 2022-11-03 19:19:30,873 INFO sqlalchemy.engine.base.Engine SHOW VARIABLES LIKE 'sql_mode'
pod-app-hostname 2022-11-03 19:19:30,873 INFO sqlalchemy.engine.base.Engine ()
pod-app-hostname INFO:sqlalchemy.engine.base.Engine:()
pod-app-hostname 2022-11-03 19:19:30,877 INFO sqlalchemy.engine.base.Engine SHOW VARIABLES LIKE 'lower_case_table_names'
pod-app-hostname 2022-11-03 19:19:30,878 INFO sqlalchemy.engine.base.Engine ()
pod-app-hostname INFO:sqlalchemy.engine.base.Engine:SHOW VARIABLES LIKE 'lower_case_table_names'
pod-app-hostname INFO:sqlalchemy.engine.base.Engine:()
pod-app-hostname INFO:sqlalchemy.engine.base.Engine:SELECT DATABASE()
pod-app-hostname 2022-11-03 19:19:30,881 INFO sqlalchemy.engine.base.Engine SELECT DATABASE()
pod-app-hostname INFO:sqlalchemy.engine.base.Engine:()
pod-app-hostname 2022-11-03 19:19:30,882 INFO sqlalchemy.engine.base.Engine ()
pod-app-hostname 2022-11-03 19:19:30,884 INFO sqlalchemy.engine.base.Engine show collation where
Charset
= 'utf8mb4' andCollation
= 'utf8mb4_bin'pod-app-hostname INFO:sqlalchemy.engine.base.Engine:show collation where
Charset
= 'utf8mb4' andCollation
= 'utf8mb4_bin'pod-app-hostname 2022-11-03 19:19:30,885 INFO sqlalchemy.engine.base.Engine ()
pod-app-hostname INFO:sqlalchemy.engine.base.Engine:()
pod-app-hostname 2022-11-03 19:19:30,887 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS CHAR(60)) AS anon_1
pod-app-hostname INFO:sqlalchemy.engine.base.Engine:SELECT CAST('test plain returns' AS CHAR(60)) AS anon_1
pod-app-hostname 2022-11-03 19:19:30,887 INFO sqlalchemy.engine.base.Engine ()
pod-app-hostname INFO:sqlalchemy.engine.base.Engine:()
pod-app-hostname 2022-11-03 19:19:30,889 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS CHAR(60)) AS anon_1
pod-app-hostname INFO:sqlalchemy.engine.base.Engine:SELECT CAST('test unicode returns' AS CHAR(60)) AS anon_1
pod-app-hostname INFO:sqlalchemy.engine.base.Engine:()
pod-app-hostname 2022-11-03 19:19:30,889 INFO sqlalchemy.engine.base.Engine ()
pod-app-hostname INFO:sqlalchemy.engine.base.Engine:SELECT CAST('test collated returns' AS CHAR CHARACTER SET utf8mb4) COLLATE utf8mb4_bin AS anon_1
pod-app-hostname INFO:sqlalchemy.engine.base.Engine:()
pod-app-hostname 2022-11-03 19:19:30,891 INFO sqlalchemy.engine.base.Engine SELECT CAST('test collated returns' AS CHAR CHARACTER SET utf8mb4) COLLATE utf8mb4_bin AS anon_1
pod-app-hostname 2022-11-03 19:19:30,891 INFO sqlalchemy.engine.base.Engine ()
pod-app-hostname DEBUG:sqlalchemy.pool.impl.NullPool:Connection <_mysql.connection open to '1.2.3.4' at 0x55beb238bc50> checked out from pool
pod-app-hostname 2022-11-03 19:19:30,895 DEBUG sqlalchemy.pool.impl.NullPool Connection <_mysql.connection open to '1.2.3.4' at 0x55beb238bc50> checked out from pool
pod-app-hostname DEBUG:sqlalchemy.pool.impl.NullPool:Pool pre-ping on connection <_mysql.connection open to '1.2.3.4' at 0x55beb238bc50>
pod-app-hostname 2022-11-03 19:19:30,895 DEBUG sqlalchemy.pool.impl.NullPool Pool pre-ping on connection <_mysql.connection open to '1.2.3.4' at 0x55beb238bc50>
pod-app-hostname 2022-11-03 19:19:30,901 DEBUG sqlalchemy.pool.impl.NullPool Connection <_mysql.connection open to '1.2.3.4' at 0x55beb238bc50> being returned to pool
pod-app-hostname DEBUG:sqlalchemy.pool.impl.NullPool:Connection <_mysql.connection open to '1.2.3.4' at 0x55beb238bc50> being returned to pool
pod-app-hostname 2022-11-03 19:19:30,902 DEBUG sqlalchemy.pool.impl.NullPool Connection <_mysql.connection open to '1.2.3.4' at 0x55beb238bc50> rollback-on-return
pod-app-hostname DEBUG:sqlalchemy.pool.impl.NullPool:Connection <_mysql.connection open to '1.2.3.4' at 0x55beb238bc50> rollback-on-return
pod-app-hostname 2022-11-03 19:19:30,903 DEBUG sqlalchemy.pool.impl.NullPool Closing connection <_mysql.connection open to '1.2.3.4' at 0x55beb238bc50>
pod-app-hostname DEBUG:sqlalchemy.pool.impl.NullPool:Closing connection <_mysql.connection open to '1.2.3.4' at 0x55beb238bc50>
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
(please complete the following information):
2.0.0
Python 3.8.12
Not installed in the Docker instance
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
I'm using an image derived from
apache/superset:2.0.0
and tried to connect both to Hive and to MySQL.The text was updated successfully, but these errors were encountered: