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

Jacek Lewandowski commented on CASSANDRA-18211:
-----------------------------------------------

[~smiklosovic] I've also created a small PR with my findings - 
https://github.com/apache/cassandra/pull/2124/files

It also makes SnapshostsTest much faster, 3x times on my local machine. There 
are two main changes which affects performance of the test:
- it uses gossip, which I think is completely unrelated to what that test aims 
to verify
- the method which verifies snapshot existence does it every 1 second, and what 
is more important, start verifying after 1 second, so it lasts at least 1 
second. In after test hook we remove all the snapshots one by one and we verify 
that using that method - since we have 12 snapshots to verify, it adds at least 
12 seconds to each test case


> Possible race between automatic and manual snapshot cleanup
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-18211
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18211
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local/Snapshots
>            Reporter: Jacek Lewandowski
>            Assignee: Jacek Lewandowski
>            Priority: Normal
>             Fix For: 4.1.x, 4.x
>
>
> Automatic deletion of expired snapshots maintained by {{SnapshotManager}} can 
> race with manual snapshot removal in a way an exception like 
> {{NoSuchFileException}} is thrown. 
> It is because the snapshot directory existence is checked and deleted if it 
> exists as a non-atomic operation. Since we can potentially have two threads 
> attempting to do that at the same time (automatic and manual snapshot 
> removal) it may lead to a race in rare situations.



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

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

Reply via email to