[
https://issues.apache.org/jira/browse/DRILL-1866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14292229#comment-14292229
]
Daniel Barclay (Drill/MapR) commented on DRILL-1866:
----------------------------------------------------
For future reference for debugging this:
The workaround mentioned above is the calls to nextUntilEnd() in TestViews and
TestJdbcDistQUery, which read to the end of the results in order to suppress
query cancelation (the cancelation that happens if a new query is made before a
ResultSet has read enough of the results).
To try to reproduce the problem, disable the calls to nextUntilEnd(). (For me,
in my environment, the tests seemed to fail reliably (several test methods
would fail in a run), but which test methods would fail was not deterministic.)
The underlying problem seems to be a race condition involved in cancelation
and/or early termination (as for a LIMIT clause) of a query. Something
(overall-query processing?) proceeds with closing a TopLevelAllocator before a
subordinate something (fragment processing?) has closed a child allocator taken
from that TopLevelAllocator. It possibly involves Foreman, its
cancelExecutingFragments(), QueryManager, FragmentExecutor, its
closeOutResources(), ScreenRoot, its stop(), LimitRecordBatch's innerNext(),
ScreenRoot.innerNext(), etc.
> Tests that include limit sporadically fail when run as part of entire test
> suite on Linux
> -----------------------------------------------------------------------------------------
>
> Key: DRILL-1866
> URL: https://issues.apache.org/jira/browse/DRILL-1866
> Project: Apache Drill
> Issue Type: Bug
> Components: Tools, Build & Test
> Reporter: Jacques Nadeau
> Assignee: Daniel Barclay (Drill/MapR)
> Priority: Critical
> Fix For: 0.8.0
>
>
> Seems to be a timing issue where memory is not being released as part of
> limit cancellation of a query.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)