Return-Path: X-Original-To: apmail-drill-dev-archive@www.apache.org Delivered-To: apmail-drill-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 19A2218374 for ; Thu, 14 Jan 2016 20:38:02 +0000 (UTC) Received: (qmail 32175 invoked by uid 500); 14 Jan 2016 20:38:01 -0000 Delivered-To: apmail-drill-dev-archive@drill.apache.org Received: (qmail 32122 invoked by uid 500); 14 Jan 2016 20:38:01 -0000 Mailing-List: contact dev-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 dev@drill.apache.org Received: (qmail 32111 invoked by uid 99); 14 Jan 2016 20:38:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jan 2016 20:38:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 53BC3E3889; Thu, 14 Jan 2016 20:38:01 +0000 (UTC) From: adeneche To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request: DRILL-3845: PartitionSender doesn't send last ... Content-Type: text/plain Message-Id: <20160114203801.53BC3E3889@git1-us-west.apache.org> Date: Thu, 14 Jan 2016 20:38:01 +0000 (UTC) Github user adeneche commented on a diff in the pull request: https://github.com/apache/drill/pull/319#discussion_r49781604 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionerTemplate.java --- @@ -286,7 +286,7 @@ public void flush(boolean schemaChanged) throws IOException { // sender has acknowledged the terminate request. After sending the last batch, all further batches are // dropped. // 3. Partitioner thread is interrupted due to cancellation of fragment. - final boolean isLastBatch = isLast || terminated || Thread.currentThread().isInterrupted(); + final boolean isLastBatch = isLast || Thread.currentThread().isInterrupted(); --- End diff -- That is true. We have 2 possible solutions to fix this problem: - either we change all receivers so they no longer wait for the last batch when it's an early termination - or we make sure the partition sender sends the last batch as soon as possible to avoid the case where it's sent too late. Like we discussed it, it's not easy to enforce the 1st solution as even the senders don't respect this , e.g. a single sender that receives an early termination message will close the fragment without letting it's receivers wait for the last batch. I will update the PR to implement the 2nd solution --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---