Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 98CD89CC8 for ; Wed, 14 Dec 2011 17:12:02 +0000 (UTC) Received: (qmail 66404 invoked by uid 500); 14 Dec 2011 17:12:02 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 66386 invoked by uid 500); 14 Dec 2011 17:12:02 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 66378 invoked by uid 99); 14 Dec 2011 17:12:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2011 17:12:02 +0000 X-ASF-Spam-Status: No, hits=-2001.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2011 17:11:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DD81611218A for ; Wed, 14 Dec 2011 17:11:30 +0000 (UTC) Date: Wed, 14 Dec 2011 17:11:30 +0000 (UTC) From: "Vijay (Updated) (JIRA)" To: commits@cassandra.apache.org Message-ID: <38247726.11742.1323882690908.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <241168800.4247.1314643237743.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CASSANDRA-3101) Should check for errors when calling /bin/ln MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CASSANDRA-3101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vijay updated CASSANDRA-3101: ----------------------------- Attachment: 0001-3101-throw-IOE-while-calling-bin-ln-v3.patch I miss read the previous message hence removed it sorry, plz find the updated. thanks! > Should check for errors when calling /bin/ln > -------------------------------------------- > > Key: CASSANDRA-3101 > URL: https://issues.apache.org/jira/browse/CASSANDRA-3101 > Project: Cassandra > Issue Type: Bug > Components: Core > Affects Versions: 0.4 > Reporter: paul cannon > Assignee: Vijay > Priority: Minor > Labels: lhf > Fix For: 1.0.6 > > Attachments: 0001-0001-throw-IOE-while-calling-bin-ln-v2.patch, 0001-3101-throw-IOE-while-calling-bin-ln-v3.patch, 0001-3101-throw-IOE-while-calling-bin-ln.patch > > > It looks like cassandra.utils.CLibrary.createHardLinkWithExec() does not check for any errors in the execution of the hard-link-making utility. This could be bad if, for example, the user has put the snapshot directory on a different filesystem from the data directory. The hard linking would fail and the sstable snapshots would not exist, but no error would be reported. > It does look like errors with the more direct JNA link() call are handled correctly- an exception is thrown. The WithExec version should probably do the same thing. > Definitely it would be enough to check the process exit value from /bin/ln for nonzero in the *nix case, but I don't know whether 'fsutil hardlink create' or 'cmd /c mklink /H' return nonzero on failure. > For bonus points, use any output from the Process's error stream in the text of the exception, to aid in debugging problems. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira