[
https://issues.apache.org/jira/browse/DRILL-7507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17006601#comment-17006601
]
ASF GitHub Bot commented on DRILL-7507:
---------------------------------------
paul-rogers commented on pull request #1949: DRILL-7507: Convert fragment
interrupts to exceptions
URL: https://github.com/apache/drill/pull/1949
Modifies fragment interrupt handling to throw a specialized exception,
rather than relying on the complex and cumbersome STOP iterator status.
## Description
PR #1948 (DRILL-7506) explains how Drill's execution engine has two error
reporting systems. The execution engine has a mechanism to tell operators that
the fragment has been cancelled. Today that system uses the `STOP`-based error
system. This PR converts the cancellation mechanism to use the exception-based
system.
Basically, an operator periodically checks if the fragment should terminate.
Rather than return a `STOP` status, the fragment now throws a specialized
exception. This check logic is encapsulated in a new `checkContinue()` method.
The fragment executor catches the exception, notices it is the special
cancellation exception that it, itself, requested, and proceeds to shut down
the fragment as if it completed with a `STOP` status (or with a runtime
exception.)
## Tests
Reran all unit tests, including `TestDrillbitResiliance` which checks for
query cancellations.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
> Convert fragment interrupts to exceptions
> -----------------------------------------
>
> Key: DRILL-7507
> URL: https://issues.apache.org/jira/browse/DRILL-7507
> Project: Apache Drill
> Issue Type: Improvement
> Affects Versions: 1.17.0
> Reporter: Paul Rogers
> Assignee: Paul Rogers
> Priority: Major
> Fix For: 1.18.0
>
>
> Operations periodically check if they should continue by calling the
> {{shouldContinue()}} method. If the method returns false, operators return a
> {{STOP}} status in some form.
> This change modifies handling to throw an exception instead; cancelling a
> fragment the same way that we handle errors.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)