You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Zhao Yang (Jira)" <ji...@apache.org> on 2024/06/13 04:05:00 UTC

[jira] [Comment Edited] (CASSANDRA-17272) LeveledCompactionStrategy disk space check improvements

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

Zhao Yang edited comment on CASSANDRA-17272 at 6/13/24 4:04 AM:
----------------------------------------------------------------

In `CompactionTask#buildCompactionCandidatesForAvailableDiskSpace` with LCS, if node has limited disk space and can't remove any sstable from L0 or L1 in `LeveledCompactionTask#reduceScopeForLimitedSpace`, `LeveledCompactionTask#partialCompactionsAcceptable` will throw `UnsupportedOperationException`.

We should handle `LeveledCompactionTask#partialCompactionsAcceptable` more gracefully with `return true` since `reduceScopeForLimitedSpace` only removes sstable from L0 or L1.


was (Author: jasonstack):
In `CompactionTask#buildCompactionCandidatesForAvailableDiskSpace` with LCS, if node has limited disk space and can't remove any sstable from L0 or L1 in `LeveledCompactionTask#reduceScopeForLimitedSpace`, `LeveledCompactionTask#partialCompactionsAcceptable` will throw `UnsupportedOperationException`.

We should handle `LeveledCompactionTask#partialCompactionsAcceptable` more gracefully with `return level <= 1`.

> LeveledCompactionStrategy disk space check improvements
> -------------------------------------------------------
>
>                 Key: CASSANDRA-17272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17272
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local/Compaction/LCS
>            Reporter: Marcus Eriksson
>            Assignee: Marcus Eriksson
>            Priority: Normal
>             Fix For: 3.0.27, 3.11.13, 4.0.4, 4.1-alpha1, 4.1
>
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> We currently allow reducing scope (removing sstables from the compaction) when starting STCS-in-L0 with LCS if the compaction is too large for the available disk space. We can do the same for L0 -> L1 compactions - but we can only remove L0 sstables to avoid causing overlap in L1.
> Also, in 3.0, when starting an LCS compaction we try to [get a writeable location|https://github.com/apache/cassandra/blob/b1a8a56c563b85ab9a34d3bbf9c16278dd441157/src/java/org/apache/cassandra/db/compaction/writers/CompactionAwareWriter.java#L128] where the full result of the compaction will fit - here we should only get a directory where the first sstable fits, otherwise the compaction might fail even though there is enough space in total among the data directories 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org