You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Joshua McKenzie (JIRA)" <ji...@apache.org> on 2015/01/09 20:30:34 UTC

[jira] [Commented] (CASSANDRA-8562) Fix checking available disk space before compaction starts

    [ https://issues.apache.org/jira/browse/CASSANDRA-8562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14271752#comment-14271752 ] 

Joshua McKenzie commented on CASSANDRA-8562:
--------------------------------------------

* Delete default no-op implementation of reduceScopeForLimitedSpace from DiskAwareRunnable as it's no longer used
* nit: normalize use of braces in:
{code}
      if (BlacklistedDirectories.isUnwritable(getLocationForDisk(dataDir)))
            continue;
      DataDirectoryCandidate candidate = new DataDirectoryCandidate(dataDir);
      // exclude directory if its total writeSize does not fit to data directory
      if (candidate.availableSpace < writeSize)
      {
            continue;
      }
{code}

A last general question - is throwing an RTE the best thing for us to do when we don't have sufficient disk space for a node to compact files?  Seems like that's a pretty serious situation for a node to be in... this gets me thinking of something like "compaction_failure_policy", similar to disk_failure or commit_failure where we can instruct what to do with a node if we hit these types of conditions.  Certainly outside the scope of this ticket but might be worth following up on if we don't have something along those lines already.

Other than the above 2 minor things, lgtm.

> Fix checking available disk space before compaction starts
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-8562
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8562
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Marcus Eriksson
>            Assignee: Marcus Eriksson
>             Fix For: 2.0.12, 2.1.3
>
>         Attachments: 0001-Check-for-available-disk-space-before-starting-compa.patch
>
>
> When starting a compaction we check if there is enough disk space available to start it, otherwise we might (for STCS) reduce the compaction so that the result could fit. Now (since CASSANDRA-8329) we check for the directory to write to a lot later and this can reduce the compaction after we have created the scanners.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)