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 B3212200C73 for ; Tue, 25 Apr 2017 10:55:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B1ADE160B9E; Tue, 25 Apr 2017 08:55:09 +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 04D84160BB3 for ; Tue, 25 Apr 2017 10:55:08 +0200 (CEST) Received: (qmail 50183 invoked by uid 500); 25 Apr 2017 08:55:08 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 50088 invoked by uid 99); 25 Apr 2017 08:55:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Apr 2017 08:55:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 7A7F81B085A for ; Tue, 25 Apr 2017 08:55:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id kJwI3hW5UfSZ for ; Tue, 25 Apr 2017 08:55:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 499B15FCD3 for ; Tue, 25 Apr 2017 08:55:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C3E22E0BDF for ; Tue, 25 Apr 2017 08:55:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2BA7421B59 for ; Tue, 25 Apr 2017 08:55:04 +0000 (UTC) Date: Tue, 25 Apr 2017 08:55:04 +0000 (UTC) From: "Till Rohrmann (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (FLINK-6319) Add timeout when shutting SystemProcessingTimeService down MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 25 Apr 2017 08:55:09 -0000 [ https://issues.apache.org/jira/browse/FLINK-6319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Till Rohrmann closed FLINK-6319. -------------------------------- Resolution: Not A Problem The user reported that the exceptions occurred when cancelling a job. This is expected and not a bug. > Add timeout when shutting SystemProcessingTimeService down > ---------------------------------------------------------- > > Key: FLINK-6319 > URL: https://issues.apache.org/jira/browse/FLINK-6319 > Project: Flink > Issue Type: Improvement > Components: Local Runtime > Affects Versions: 1.3.0 > Reporter: Till Rohrmann > Priority: Minor > > A user noted that we simply call {{shutdownNow}} on the {{SystemProcessingTimeService's}} {{ScheduledThreadpoolExecutor}} when calling {{SystemProcessingTimeService.shutdownService}}. {{shutdowNow}} will halt all waiting tasks but it won't wait until the currently running tasks have been completed. This can lead to unwanted runtime behaviours such as wrong termination orders when shutting down tasks (as reported in https://issues.apache.org/jira/browse/FLINK-4973?focusedCommentId=15965884&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15965884). > I propose to add a small timeout to wait for currently running tasks to complete. Even though this problem cannot be completely solved since timer tasks might take longer than the specified timeout, a timeout for waiting for running tasks to complete will mitigate the problem. > We can do this by calling {{timerServicer.awaitTermination(timeout, timeoutUnit);}} after the {{shutdowNow}} call. -- This message was sent by Atlassian JIRA (v6.3.15#6346)