Skip to content

Commit

Permalink
Document failure handling in Presto worker protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
arhimondr committed Apr 11, 2024
1 parent 3f34db9 commit 7ef86c6
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions presto-docs/src/main/sphinx/develop/worker-protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,24 @@ upstream workers using buffer number 2.

.. image:: worker-protocol-output-buffers.png
:width: 600

Failure Handling
~~~~~~~~~~~~~~~~

Task failures are reported to the coordinator via ``TaskStatus`` and ``TaskInfo``
updates.

When a task failure is discovered, the coordinator aborts all remaining tasks and
reports a query failure to the client. When a task failure occurs or an abort
request is received, all further processing stops, and all remaining task output
is discarded.

Failed or aborted tasks continue responding to data plane requests as usual to
prevent cascading failures. Because the output is fully discarded upon failure, all
following responses are empty. The ``X-Presto-Buffer-Complete`` header is set to
``false`` to prevent downstream tasks from finishing successfully and producing
incorrect results.

To the client, these responses are indistinguishable from those of healthy tasks.
To avoid request bursts, a standard delay before responding with an empty result
set is applied.

0 comments on commit 7ef86c6

Please sign in to comment.