-
-
Notifications
You must be signed in to change notification settings - Fork 3
Description
We found a very ugly issue when connecting superset to trino. A user has reported that superset is very slow and no query is processed sometimes. We found out that superset does not finish its queries when somebody selects a table (iceberg) in the "SEE TABLE SCHEMA" dropdown. Combined with our resource pools (users can submit only 5 queries at a time, 6th will be queued) that's definitely a customer facing problem for us.

3 Queries to trino are fired from superset which are all the same
SELECT * FROM default."tablename$partitions"

Superset already gets a result after couple of seconds and displays the table schema but the query stays in state "FINISHING" until a timeout of ~5mins is hit. The query then is abandoned by trino itself.
io.trino.spi.TrinoException: Query 20250828_082847_00409_ksycd was abandoned by the client, as it may have exited or stopped checking for query results. Query results have not been accessed since 2025-08-28T08:28:49.874Z: currentTime 2025-08-28T08:33:50.786Z
at io.trino.execution.QueryTracker.failAbandonedQueries(QueryTracker.java:275)
at io.trino.execution.QueryTracker.lambda$start$0(QueryTracker.java:83)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Do you have an idea what to do? Maybe you know that already?
Edit: The tables have a bigger amount of partitions, we didn't manage to optimize them yet. Some of the tables have ~10.000 partitions (they are streaming destinations partitioned by processing-time for a spark application with 10min batches). Maybe that's relevant, but I don't think so because superset displays the schema just in time - it feels like just a thing of non terminating queries. According to trino superset fetches ~10000 rows and 5mb from those queries.
We are running superset:4.0.2-stackable25.3.0 and trino:451-stackable24.11.0 in that environment