From commits-return-8295-apmail-helix-commits-archive=helix.apache.org@helix.apache.org Sun Mar 31 20:15:04 2019 Return-Path: X-Original-To: apmail-helix-commits-archive@minotaur.apache.org Delivered-To: apmail-helix-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 27CBF18B5A for ; Sun, 31 Mar 2019 20:15:04 +0000 (UTC) Received: (qmail 44599 invoked by uid 500); 31 Mar 2019 20:15:04 -0000 Delivered-To: apmail-helix-commits-archive@helix.apache.org Received: (qmail 44560 invoked by uid 500); 31 Mar 2019 20:15:04 -0000 Mailing-List: contact commits-help@helix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@helix.apache.org Delivered-To: mailing list commits@helix.apache.org Received: (qmail 44551 invoked by uid 99); 31 Mar 2019 20:15:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Mar 2019 20:15:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A353B180DF0 for ; Sun, 31 Mar 2019 20:15:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -113.001 X-Spam-Level: X-Spam-Status: No, score=-113.001 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id CmkNgAT-RcYE for ; Sun, 31 Mar 2019 20:15:01 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 899AD60FBD for ; Sun, 31 Mar 2019 20:15:01 +0000 (UTC) Received: (qmail 44484 invoked by uid 99); 31 Mar 2019 20:15:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Mar 2019 20:15:01 +0000 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 B27F4E0111 for ; Sun, 31 Mar 2019 20:15:00 +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 349E524597 for ; Sun, 31 Mar 2019 20:15:00 +0000 (UTC) Date: Sun, 31 Mar 2019 20:15:00 +0000 (UTC) From: "bd2019us (JIRA)" To: commits@helix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HELIX-815) File.mkdir() may fail and cause crash. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HELIX-815?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] bd2019us updated HELIX-815: --------------------------- Issue Type: Bug (was: Improvement) > File.mkdir() may fail and cause crash. > -------------------------------------- > > Key: HELIX-815 > URL: https://issues.apache.org/jira/browse/HELIX-815 > Project: Apache Helix > Issue Type: Bug > Components: helix-core > Reporter: bd2019us > Priority: Major > Labels: pull-request-available > Attachments: 1.patch > > Time Spent: 10m > Remaining Estimate: 0h > > Location:=C2=A0helix-core/src/main/java/org/apache/helix/tools/commandtoo= ls/ZkGrep.java: 584 > The File.mkdir() API requires the parent directory have to exist, otherwi= se a failure will occur. To ensure the safety of file creation, the File.mk= dirs() is preferred as it will create the parent directory as well if neede= d. This is important as if it fail, program may potentially crash. Besides,= mkdirs() causes no extra overhead. -- This message was sent by Atlassian JIRA (v7.6.3#76005)