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 77F76200BCB for ; Thu, 24 Nov 2016 12:17:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 76C76160B11; Thu, 24 Nov 2016 11:17: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 A1EB5160B20 for ; Thu, 24 Nov 2016 12:16:59 +0100 (CET) Received: (qmail 44026 invoked by uid 500); 24 Nov 2016 11:16:58 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 43846 invoked by uid 99); 24 Nov 2016 11:16:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Nov 2016 11:16:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 83C932C03E1 for ; Thu, 24 Nov 2016 11:16:58 +0000 (UTC) Date: Thu, 24 Nov 2016 11:16:58 +0000 (UTC) From: "Barna Zsombor Klara (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-15168) Flaky test: TestSparkClient.testJobSubmission (still flaky) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 24 Nov 2016 11:17:00 -0000 [ https://issues.apache.org/jira/browse/HIVE-15168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Barna Zsombor Klara updated HIVE-15168: --------------------------------------- Attachment: HIVE-15168.2.patch Added a comment in the listener where we set the QUEUED state clarifying that the state transition may not happen if the job succeeds before it is called. The javadoc on the JobHandleImpl#changeState(State newState) is already clear enough I think. > Flaky test: TestSparkClient.testJobSubmission (still flaky) > ----------------------------------------------------------- > > Key: HIVE-15168 > URL: https://issues.apache.org/jira/browse/HIVE-15168 > Project: Hive > Issue Type: Sub-task > Reporter: Barna Zsombor Klara > Assignee: Barna Zsombor Klara > Fix For: 2.2.0 > > Attachments: HIVE-15168.1.patch, HIVE-15168.2.patch, HIVE-15168.patch > > > [HIVE-14910|https://issues.apache.org/jira/browse/HIVE-14910] already addressed one source of flakyness bud sadly not all it seems. > In JobHandleImpl the listeners are registered after the job has been submitted. > This may end up in a racecondition. > {code} > // Link the RPC and the promise so that events from one are propagated to the other as > // needed. > rpc.addListener(new GenericFutureListener>() { > @Override > public void operationComplete(io.netty.util.concurrent.Future f) { > if (f.isSuccess()) { > handle.changeState(JobHandle.State.QUEUED); > } else if (!promise.isDone()) { > promise.setFailure(f.cause()); > } > } > }); > promise.addListener(new GenericFutureListener>() { > @Override > public void operationComplete(Promise p) { > if (jobId != null) { > jobs.remove(jobId); > } > if (p.isCancelled() && !rpc.isDone()) { > rpc.cancel(true); > } > } > }); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)