The SQL analytics router in SQLPlugin handled errors by sending a raw
BytesRestResponse without incrementing FAILED_REQ_COUNT_CUS or
FAILED_REQ_COUNT_SYS, so SQL+AE failures were invisible in stats. Unlike
the PPL path, the router owns the channel and never routes failures back
to RestSqlAction's terminal error handler.
Make RestSqlAction.handleException public static and call it from the
analytics router onFailure callbacks so failure metrics and proper error
formatting are applied consistently. The PPL+AE path already publishes
metrics via RestPPLQueryAction's listener, so no change is needed there.
Signed-off-by: Chen Dai <daichen@amazon.com>
Description
This PR fixes the SQL analytics engine (AE) execution path so failures now publish failure metrics and are logged, consistent with the SQL V2 path. The PPL AE path needs no change — failures already propagate to the top-level listener callback in
RestPPLQueryAction.onFailure().Example
Use the unsupported SEC_TO_TIME function to trigger a backend failure on both endpoints, followed by the stats. Both
failed_request_count_syserr(SQL) andppl_failed_request_count_syserr(PPL) now increment correctly on AE failures, with no double-counting:Related Issues
Part of #5246
Check List
--signoffor-s.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.