Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3E283200BDA for ; Tue, 29 Nov 2016 02:14:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 38312160B0D; Tue, 29 Nov 2016 01:14:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 83B01160B22 for ; Tue, 29 Nov 2016 02:13:59 +0100 (CET) Received: (qmail 20164 invoked by uid 500); 29 Nov 2016 01:13:58 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 20141 invoked by uid 99); 29 Nov 2016 01:13:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2016 01:13:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 5CB682C03DF for ; Tue, 29 Nov 2016 01:13:58 +0000 (UTC) Date: Tue, 29 Nov 2016 01:13:58 +0000 (UTC) From: "Paul Rogers (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (DRILL-5083) IteratorValidator does not handle RecordIterator cleanup call to next( ) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 29 Nov 2016 01:14:00 -0000 [ https://issues.apache.org/jira/browse/DRILL-5083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15703762#comment-15703762 ] Paul Rogers edited comment on DRILL-5083 at 11/29/16 1:13 AM: -------------------------------------------------------------- Stepping further, once the original {{MergeJoinBatch.close( )}} returned, it was called a second time during {{FragmentExeucutor.closeOutResources()}}. The whole bounce up & down occurs a second time. But, the second time, in {{IteratorValidatorBatchIterator.next()}}, the {{exceptionState}} member is (somehow) no longer set. This lets the operator proceed as if there is no error. It proceeds to call: {code} batchState = incoming.next(); {code} This eventually hits: {code} public final IterOutcome next(final RecordBatch b) { if(!context.shouldContinue()) { return IterOutcome.STOP; // <-- Ends up here } return next(0, b); } {code} This all seems rather ad-hoc... was (Author: paul-rogers): Stepping further, once the original {{MergeJoinBatch.close( )}} returned, it was called a second time during {{FragmentExeucutor.closeOutResources()}}. The whole bounce up & down occurs a second time. > IteratorValidator does not handle RecordIterator cleanup call to next( ) > ------------------------------------------------------------------------ > > Key: DRILL-5083 > URL: https://issues.apache.org/jira/browse/DRILL-5083 > Project: Apache Drill > Issue Type: Bug > Affects Versions: 1.8.0 > Reporter: Paul Rogers > Priority: Minor > > This one is very confusing... > In a test with a MergeJoin and external sort, operators are stacked something like this: > {code} > Screen > - MergeJoin > - - External Sort > ... > {code} > Using the injector to force a OOM in spill, the external sort threw a UserException up the stack. This was handed by: > {code} > IteratorValidatorBatchIterator.next( ) > RecordIterator.clearInflightBatches( ) > RecordIterator.close( ) > MergeJoinBatch.close( ) > {code} > Which does the following: > {code} > // Check whether next() should even have been called in current state. > if (null != exceptionState) { > throw new IllegalStateException( > {code} > But, the exceptionState is set, so we end up throwing an IllegalStateException during cleanup. > Seems the code should agree: if {{next( )}} will be called during cleanup, then {{next( )}} should gracefully handle that case. -- This message was sent by Atlassian JIRA (v6.3.4#6332)