aminghadersohi commented on code in PR #45859:
URL: https://github.com/apache/superset/pull/45859#discussion_r4428425050
##########
superset/sql/execution/celery_task.py:
##########
@@ -661,6 +661,14 @@ def _execute_sql_statements(
level=ErrorLevel.ERROR,
)
) from ex
+ except Exception:
Review Comment:
If Stop races a real fetch or result-conversion failure (e.g.
`MemoryError`), this handler drops its traceback and `error_sqllab_unhandled`
metric for every engine. Preserve diagnostics for errors unrelated to
cancellation.
##########
docs/admin_docs/configuration/configuring-superset.mdx:
##########
@@ -835,6 +835,16 @@ pending when result fetching begins, the additional
polling wait is bounded by
a timeout. Configure the driver's network timeout separately to bound
individual
RPC calls.
+Impala reports a streaming `SELECT` as finished as soon as its rows can be
fetched,
+so most of such a query runs while SQL Lab reads its results. While it
fetches, the
+worker checks for a stop between result RPCs, at most once per
+`DB_POLL_INTERVAL_SECONDS`, and cancels the query on its own connection. Each
result
+RPC returns within Impala's `FETCH_ROWS_TIMEOUT_MS` query option (10 seconds by
+default, available from Impala 3.4) even when no rows are ready, so a stop
takes
+effect within about `FETCH_ROWS_TIMEOUT_MS` plus `DB_POLL_INTERVAL_SECONDS`;
+lowering either makes stops take effect sooner. Impala checks for cancellation
between row batches, so a batch whose
Review Comment:
`FETCH_ROWS_TIMEOUT_MS=0` makes fetch requests wait indefinitely, so
lowering it to zero can prevent Stop from being observed until the fetch
returns. The tuning guidance needs to require a positive value.
```suggestion
RPC returns within Impala's `FETCH_ROWS_TIMEOUT_MS` query option (10 seconds
by
default, available from Impala 3.4) when it is positive, even when no rows
are ready,
so a stop takes effect within about that timeout plus
`DB_POLL_INTERVAL_SECONDS`.
Lowering a positive timeout or the poll interval makes stops take effect
sooner.
Setting `FETCH_ROWS_TIMEOUT_MS=0` disables the timeout and can delay Stop
until the
fetch returns. Impala checks for cancellation between row batches, so a
batch whose
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]