[ 
https://issues.apache.org/jira/browse/CASSANDRA-14103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcus Eriksson updated CASSANDRA-14103:
----------------------------------------
                        Authors: Marcus Eriksson
    Test and Documentation Plan: new unit tests, cci run
                         Status: Patch Available  (was: Open)

Patch: https://github.com/krummas/cassandra/commits/marcuse/14103
cci: 
https://app.circleci.com/pipelines/github/krummas/cassandra/502/workflows/3403b209-f0fd-4763-a3fe-6cd81ca9b263

this patch contains 2 commits, one which cleans up 
{{CompactionStrategyManager}} a bit and makes sure we don't miss any 
notifications, the other one fixes LCS to correctly handle getting 
added/removed notifications for sstables already added/removed by 
{{maybeReloadDiskBoundaries()}}

The second patch here essentially just changes the levels in LCS from lists to 
(sorted) sets, and the reason is that checking if an sstable already exists in 
the manifest gets very slow if we have many sstables (like when we are overrun 
in L0 for example). This also improves startup time which is more important now 
that we reload the compaction strategies after every range movement. This is a 
reworked patch from CASSANDRA-14826.

> Fix potential race during compaction strategy reload
> ----------------------------------------------------
>
>                 Key: CASSANDRA-14103
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14103
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local/Compaction
>            Reporter: Paulo Motta
>            Assignee: Marcus Eriksson
>            Priority: Urgent
>         Attachments: 3.11-14103-dtest.png, 3.11-14103-testall.png, 
> trunk-14103-dtest.png, trunk-14103-testall.png
>
>
> When the compaction strategies are reloaded after disk boundary changes 
> (CASSANDRA-13948), it's possible that a recently finished SSTable is added 
> twice to the compaction strategy: once when the compaction strategies are 
> reloaded due to the disk boundary change ({{maybeReloadDiskBoundarie}}), and 
> another when the {{CompactionStrategyManager}} is processing the 
> {{SSTableAddedNotification}}.
> This should be quite unlikely because a compaction must finish as soon as the 
> disk boundary changes, and even if it happens most compaction strategies 
> would not be affected by it since they deduplicate sstables internally, but 
> we should protect against such scenario. 
> For more context see [this 
> comment|https://issues.apache.org/jira/browse/CASSANDRA-13948?focusedCommentId=16280448&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16280448]
>  from Marcus.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to