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 A8A27200CE7 for ; Fri, 1 Sep 2017 11:45:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A6FFC16CB8B; Fri, 1 Sep 2017 09:45:08 +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 ED95016CB89 for ; Fri, 1 Sep 2017 11:45:07 +0200 (CEST) Received: (qmail 86954 invoked by uid 500); 1 Sep 2017 09:45:06 -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 86943 invoked by uid 99); 1 Sep 2017 09:45:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Sep 2017 09:45:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 7CB31C1FC5 for ; Fri, 1 Sep 2017 09:45:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, 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 (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id YdWCWZeOiVr1 for ; Fri, 1 Sep 2017 09:45:01 +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 708945FD42 for ; Fri, 1 Sep 2017 09:45:01 +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 EFEFEE0D4A for ; Fri, 1 Sep 2017 09:45: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 76B9B24157 for ; Fri, 1 Sep 2017 09:45:00 +0000 (UTC) Date: Fri, 1 Sep 2017 09:45:00 +0000 (UTC) From: "Aleksey Yeschenko (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-13692) CompactionAwareWriter_getWriteDirectory throws incompatible exceptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 01 Sep 2017 09:45:08 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-13692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16150291#comment-16150291 ] Aleksey Yeschenko commented on CASSANDRA-13692: ----------------------------------------------- [~dimitarndimitrov] Maybe, maybe not. The screenshot is useless to me as I can't click on test details. > CompactionAwareWriter_getWriteDirectory throws incompatible exceptions > ---------------------------------------------------------------------- > > Key: CASSANDRA-13692 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13692 > Project: Cassandra > Issue Type: Bug > Components: Compaction > Reporter: Hao Zhong > Assignee: Dimitar Dimitrov > Labels: lhf > Attachments: c13692-2.2-dtest-results.PNG, c13692-2.2-testall-results.PNG, c13692-3.0-dtest-results.PNG, c13692-3.0-testall-results.PNG, c13692-3.11-dtest-results.PNG, c13692-3.11-testall-results.PNG, c13692-dtest-results.PNG, c13692-testall-results.PNG > > > The CompactionAwareWriter_getWriteDirectory throws RuntimeException: > {code} > public Directories.DataDirectory getWriteDirectory(Iterable sstables, long estimatedWriteSize) > { > File directory = null; > for (SSTableReader sstable : sstables) > { > if (directory == null) > directory = sstable.descriptor.directory; > if (!directory.equals(sstable.descriptor.directory)) > { > logger.trace("All sstables not from the same disk - putting results in {}", directory); > break; > } > } > Directories.DataDirectory d = getDirectories().getDataDirectoryForFile(directory); > if (d != null) > { > long availableSpace = d.getAvailableSpace(); > if (availableSpace < estimatedWriteSize) > throw new RuntimeException(String.format("Not enough space to write %s to %s (%s available)", > FBUtilities.prettyPrintMemory(estimatedWriteSize), > d.location, > FBUtilities.prettyPrintMemory(availableSpace))); > logger.trace("putting compaction results in {}", directory); > return d; > } > d = getDirectories().getWriteableLocation(estimatedWriteSize); > if (d == null) > throw new RuntimeException(String.format("Not enough disk space to store %s", > FBUtilities.prettyPrintMemory(estimatedWriteSize))); > return d; > } > {code} > However, the thrown exception does not trigger the failure policy. CASSANDRA-11448 fixed a similar problem. The buggy code is: > {code} > protected Directories.DataDirectory getWriteDirectory(long writeSize) > { > Directories.DataDirectory directory = getDirectories().getWriteableLocation(writeSize); > if (directory == null) > throw new RuntimeException("Insufficient disk space to write " + writeSize + " bytes"); > return directory; > } > {code} > The fixed code is: > {code} > protected Directories.DataDirectory getWriteDirectory(long writeSize) > { > Directories.DataDirectory directory = getDirectories().getWriteableLocation(writeSize); > if (directory == null) > throw new FSWriteError(new IOException("Insufficient disk space to write " + writeSize + " bytes"), ""); > return directory; > } > {code} > The fixed code throws FSWE and triggers the failure policy. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org For additional commands, e-mail: commits-help@cassandra.apache.org